8021418: Intermittent: SSLSocketSSLEngineTemplate.java test fails with timeout
Reviewed-by: xuelei, wetmore
Contributed-by: rajan.halade@oracle.com
--- 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);