changeset 9014:5ac7cd164300

8021418: Intermittent: SSLSocketSSLEngineTemplate.java test fails with timeout Reviewed-by: xuelei, wetmore Contributed-by: rajan.halade@oracle.com
author juh
date Wed, 27 Nov 2013 15:25:36 -0800
parents 2370d285d08b
children 4afe1281c837
files test/sun/security/ssl/templates/SSLSocketSSLEngineTemplate.java
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/test/sun/security/ssl/templates/SSLSocketSSLEngineTemplate.java	Wed Nov 27 10:01:08 2013 -0800
+++ b/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);