harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geir Magnusson Jr <g...@pobox.com>
Subject Re: [classlib][nio] Platform dependent tests in SocketChannelTest
Date Thu, 29 Jun 2006 09:08:50 GMT


Andrew Zhang wrote:
> Hello everybody,
> 
> I noticed there are 8 FIXMEs in SocketChannelTest, which are mainly caused
> by platform differences.
> 
> Take following FIXME as example:
> 
> 
>    public void testCFII_ServerStartLater_NonBlock() throws Exception {
>        // ensure
>        ensureServerClosed();
>        this.channel1.configureBlocking(false);
>        statusNotConnected_NotPending();
>        // connect
>        assertFalse(this.channel1.connect(localAddr1));
>        statusNotConnected_Pending();
> 
>        ensureServerOpen();
> 
>        try {
>            assertFalse(this.channel1.finishConnect());
>            statusNotConnected_Pending();
>            this.channel1.close();
>        } catch (ConnectException e) {
>            // FIXME: assertEquals(e.getMessage(), "Connection refused");
>        }
>    }
> The process of this test looks like:
> client socket connect (server is closed) -> open server -> finishConnect .
> 
> RI acts differently on windows and Linux:
> On windows, finishConnect returns false.
> On Linux, finishConnect throws ConnectException instead of returning false.

You're kidding... Is there a bug report filed w/ Sun?  If not, we should
file it and keep track of the bugs we find and file...

> 
> and Harmony acts the exactly SAME as RI.
> 
> Could anyone give some suggestions on such platform dependent tests?
> Remove them? or other solutions?

I don't think we should remove them.  The only thing I can think of is
adding a platform dimension to our "testing parameter space"

> 
> Personally,  I prefer to remove these tests.
> Any suggestions are highly appreciated!
> 
> Thanks!
> 
> Best regards,
> 
> 

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Mime
View raw message