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,


--
Andrew Zhang
China Software Development Lab, IBM

Reply via email to