jdk/test/java/net/Socket/SoTimeout.java
changeset 6115 7c523cf2bc8a
parent 5506 202f599c92aa
child 7668 d4a77089c587
--- a/jdk/test/java/net/Socket/SoTimeout.java	Tue Jul 20 10:41:50 2010 -0400
+++ b/jdk/test/java/net/Socket/SoTimeout.java	Wed Jul 21 13:29:26 2010 +0100
@@ -52,9 +52,10 @@
         t.start();
 
         Socket s = serverSocket.accept();
+        serverSocket.close();
 
-        // set a 1 second timeout on the socket
-        s.setSoTimeout(1000);
+        // set a 5 second timeout on the socket
+        s.setSoTimeout(5000);
 
         s.getInputStream().read(b, 0, b.length);
         s.close();
@@ -64,7 +65,7 @@
         // this sequence should complete fairly quickly and if it
         // takes something resembling the the SoTimeout value then
         // we are probably incorrectly blocking and not waking up
-        if (waited > 500) {
+        if (waited > 2000) {
             throw new Exception("shouldn't take " + waited + " to complete");
         }
     }