harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paulex Yang <paulex.y...@gmail.com>
Subject Re: [classlib][nio] Platform dependent tests in SocketChannelTest
Date Thu, 29 Jun 2006 05:03:39 GMT
Andrew,

I think we have test conventions discussion on this topic, and the 
discussion result are summarized here:

http://incubator.apache.org/harmony/subcomponents/classlibrary/testing.html

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.
>
> and Harmony acts the exactly SAME as RI.
>
> Could anyone give some suggestions on such platform dependent tests?
> Remove them? or other solutions?
>
> Personally,  I prefer to remove these tests.
> Any suggestions are highly appreciated!
>
> Thanks!
>
> Best regards,
>
>


-- 
Paulex Yang
China Software Development Lab
IBM



---------------------------------------------------------------------
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