diff -r 278e1c6c3e99 -r 1753108d07b9 test/jdk/java/net/httpclient/SmallTimeout.java --- a/test/jdk/java/net/httpclient/SmallTimeout.java Fri Mar 02 15:14:03 2018 +0000 +++ b/test/jdk/java/net/httpclient/SmallTimeout.java Sat Mar 03 09:54:31 2018 +0000 @@ -22,6 +22,7 @@ */ import java.io.IOException; +import java.net.InetSocketAddress; import java.net.ServerSocket; import java.net.URI; import java.net.http.HttpClient; @@ -77,7 +78,9 @@ public static void main(String[] args) throws Exception { HttpClient client = HttpClient.newHttpClient(); - try (ServerSocket ss = new ServerSocket(0, 20)) { + try (ServerSocket ss = new ServerSocket()) { + ss.setReuseAddress(false); + ss.bind(new InetSocketAddress(0)); int port = ss.getLocalPort(); URI uri = new URI("http://127.0.0.1:" + port + "/");