diff -r c8fe5ffdfe98 -r 4c502e3991bf test/jdk/java/net/httpclient/http2/server/Http2TestServer.java --- a/test/jdk/java/net/httpclient/http2/server/Http2TestServer.java Fri May 18 15:23:56 2018 +0100 +++ b/test/jdk/java/net/httpclient/http2/server/Http2TestServer.java Wed May 23 16:44:13 2018 +0100 @@ -53,6 +53,7 @@ final SSLContext sslContext; final String serverName; final HashMap connections; + final Properties properties; private static ThreadFactory defaultThreadFac = (Runnable r) -> { @@ -67,11 +68,11 @@ } public Http2TestServer(String serverName, boolean secure, int port) throws Exception { - this(serverName, secure, port, getDefaultExecutor(), 50, null); + this(serverName, secure, port, getDefaultExecutor(), 50, null, null); } public Http2TestServer(boolean secure, int port) throws Exception { - this(null, secure, port, getDefaultExecutor(), 50, null); + this(null, secure, port, getDefaultExecutor(), 50, null, null); } public InetSocketAddress getAddress() { @@ -85,19 +86,19 @@ public Http2TestServer(boolean secure, SSLContext context) throws Exception { - this(null, secure, 0, null, 50, context); + this(null, secure, 0, null, 50, null, context); } public Http2TestServer(String serverName, boolean secure, SSLContext context) throws Exception { - this(serverName, secure, 0, null, 50, context); + this(serverName, secure, 0, null, 50, null, context); } public Http2TestServer(boolean secure, int port, ExecutorService exec, SSLContext context) throws Exception { - this(null, secure, port, exec, 50, context); + this(null, secure, port, exec, 50, null, context); } public Http2TestServer(String serverName, @@ -107,7 +108,7 @@ SSLContext context) throws Exception { - this(serverName, secure, port, exec, 50, context); + this(serverName, secure, port, exec, 50, null, context); } /** @@ -120,6 +121,7 @@ * @param port listen port * @param exec executor service (cached thread pool is used if null) * @param backlog the server socket backlog + * @param properties additional configuration properties * @param context the SSLContext used when secure is true */ public Http2TestServer(String serverName, @@ -127,6 +129,7 @@ int port, ExecutorService exec, int backlog, + Properties properties, SSLContext context) throws Exception { @@ -140,6 +143,7 @@ this.exec = exec == null ? getDefaultExecutor() : exec; this.handlers = Collections.synchronizedMap(new HashMap<>()); this.sslContext = context; + this.properties = properties; this.connections = new HashMap<>(); } @@ -264,7 +268,6 @@ socket.close(); } System.err.println("TestServer: start exception: " + e); - //throw e; } } } catch (SecurityException se) { @@ -285,7 +288,7 @@ Socket socket, Http2TestExchangeSupplier exchangeSupplier) throws IOException { - return new Http2TestServerConnection(http2TestServer, socket, exchangeSupplier); + return new Http2TestServerConnection(http2TestServer, socket, exchangeSupplier, properties); } @Override