test/jdk/java/net/httpclient/websocket/PendingTextPongClose.java
branchhttp-client-branch
changeset 56486 b664a887e277
parent 56451 9585061fdb04
child 56507 2294c51eae30
--- a/test/jdk/java/net/httpclient/websocket/PendingTextPongClose.java	Thu Apr 26 14:11:03 2018 +0100
+++ b/test/jdk/java/net/httpclient/websocket/PendingTextPongClose.java	Thu Apr 26 14:42:36 2018 +0100
@@ -38,8 +38,8 @@
 import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
-
-import static java.net.http.HttpClient.newHttpClient;
+import static java.net.http.HttpClient.Builder.NO_PROXY;
+import static java.net.http.HttpClient.newBuilder;
 
 public class PendingTextPongClose extends PendingOperations {
 
@@ -52,7 +52,7 @@
         repeatable(() -> {
             server = Support.notReadingServer();
             server.open();
-            webSocket = newHttpClient().newWebSocketBuilder()
+            webSocket = newBuilder().proxy(NO_PROXY).build().newWebSocketBuilder()
                     .buildAsync(server.getURI(), new WebSocket.Listener() { })
                     .join();
             CharBuffer data = CharBuffer.allocate(65536);