8021418: Intermittent: SSLSocketSSLEngineTemplate.java test fails with timeout

Reviewed-by: xuelei, wetmore
This commit is contained in:
Rajan Halade 2013-11-27 15:25:36 -08:00 committed by Jason Uh
parent a372dd2082
commit dec69128e0

View File

@ -206,7 +206,9 @@ public class SSLSocketSSLEngineTemplate {
private void runTest(boolean direct) throws Exception { private void runTest(boolean direct) throws Exception {
boolean serverClose = direct; boolean serverClose = direct;
serverSocket = new ServerSocket(0); serverSocket = new ServerSocket();
serverSocket.setReuseAddress(false);
serverSocket.bind(null);
int port = serverSocket.getLocalPort(); int port = serverSocket.getLocalPort();
Thread thread = createClientThread(port, serverClose); Thread thread = createClientThread(port, serverClose);