jdk/test/java/net/httpclient/http2/Timeout.java
changeset 44854 5a486e0acd29
parent 42460 7133f144981a
--- a/jdk/test/java/net/httpclient/http2/Timeout.java	Fri Apr 28 16:51:56 2017 +0530
+++ b/jdk/test/java/net/httpclient/http2/Timeout.java	Fri Apr 28 14:16:33 2017 +0100
@@ -32,6 +32,7 @@
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.CompletionException;
 import javax.net.ssl.SSLServerSocket;
+import javax.net.ssl.SSLParameters;
 import javax.net.ssl.SSLServerSocketFactory;
 import javax.net.ssl.SSLSocket;
 import static jdk.incubator.http.HttpRequest.BodyProcessor.fromString;
@@ -75,6 +76,9 @@
             Thread server = new Thread(() -> {
                 while (true) {
                     System.out.println("server: ready");
+                    SSLParameters params = ssocket.getSSLParameters();
+                    params.setApplicationProtocols(new String[]{"h2"});
+                    ssocket.setSSLParameters(params);
                     ready = true;
                     try (SSLSocket socket = (SSLSocket) ssocket.accept()) {