8021418: Intermittent: SSLSocketSSLEngineTemplate.java test fails with timeout
authorjuh
Wed, 27 Nov 2013 15:25:36 -0800
changeset 21943 0fdb9441797f
parent 21853 8aa7444a01a8
child 21944 924b78f629be
8021418: Intermittent: SSLSocketSSLEngineTemplate.java test fails with timeout Reviewed-by: xuelei, wetmore Contributed-by: rajan.halade@oracle.com
jdk/test/sun/security/ssl/templates/SSLSocketSSLEngineTemplate.java
--- a/jdk/test/sun/security/ssl/templates/SSLSocketSSLEngineTemplate.java	Wed Nov 27 10:01:08 2013 -0800
+++ b/jdk/test/sun/security/ssl/templates/SSLSocketSSLEngineTemplate.java	Wed Nov 27 15:25:36 2013 -0800
@@ -206,7 +206,9 @@
     private void runTest(boolean direct) throws Exception {
         boolean serverClose = direct;
 
-        serverSocket = new ServerSocket(0);
+        serverSocket = new ServerSocket();
+        serverSocket.setReuseAddress(false);
+        serverSocket.bind(null);
         int port = serverSocket.getLocalPort();
         Thread thread = createClientThread(port, serverClose);