harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r747813 - /harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/SocketTest.java
Date Wed, 25 Feb 2009 15:13:54 GMT
Author: hindessm
Date: Wed Feb 25 15:13:52 2009
New Revision: 747813

URL: http://svn.apache.org/viewvc?rev=747813&view=rev
Log:
This test often fails for me because if the client connect completes
before the server socket closes then the client socket is left in
CLOSE_WAIT state. The CLOSE_WAIT socket is then still using the port
so the SECOND_TIME bind fails.  Oddly it passes 100% of the time on
the RI because the close always seems to happen before the connect
completes and so the connect always fails with 0 return code.

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/SocketTest.java

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/SocketTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/SocketTest.java?rev=747813&r1=747812&r2=747813&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/SocketTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/SocketTest.java
Wed Feb 25 15:13:52 2009
@@ -93,8 +93,8 @@
                 }
 
                 socket.setSoTimeout(5000);
-                socket.accept();
-
+                Socket client = socket.accept();
+                client.close();
                 socket.close();
             } catch (IOException e) {
                 e.printStackTrace();



Mime
View raw message