From dec69128e0aa4d0e5e50554f979072cf807f8279 Mon Sep 17 00:00:00 2001 From: Rajan Halade Date: Wed, 27 Nov 2013 15:25:36 -0800 Subject: [PATCH] 8021418: Intermittent: SSLSocketSSLEngineTemplate.java test fails with timeout Reviewed-by: xuelei, wetmore --- .../security/ssl/templates/SSLSocketSSLEngineTemplate.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jdk/test/sun/security/ssl/templates/SSLSocketSSLEngineTemplate.java b/jdk/test/sun/security/ssl/templates/SSLSocketSSLEngineTemplate.java index 7e97d8e0410..16696dbe414 100644 --- a/jdk/test/sun/security/ssl/templates/SSLSocketSSLEngineTemplate.java +++ b/jdk/test/sun/security/ssl/templates/SSLSocketSSLEngineTemplate.java @@ -206,7 +206,9 @@ public class SSLSocketSSLEngineTemplate { 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);