http-client-branch: (WebSocket) fixing sloppy commit http-client-branch
authorprappo
Thu, 15 Feb 2018 12:08:12 +0000
branchhttp-client-branch
changeset 56130 c99ed32a4d12
parent 56129 fe88abe462c9
child 56131 99f144742013
http-client-branch: (WebSocket) fixing sloppy commit
test/jdk/java/net/httpclient/websocket/WebSocketTest.java
--- a/test/jdk/java/net/httpclient/websocket/WebSocketTest.java	Thu Feb 15 10:23:00 2018 +0000
+++ b/test/jdk/java/net/httpclient/websocket/WebSocketTest.java	Thu Feb 15 12:08:12 2018 +0000
@@ -557,6 +557,7 @@
 
             WebSocket.Listener listener = new WebSocket.Listener() {
 
+                List<String> collected = new ArrayList<>();
                 StringBuilder text = new StringBuilder();
 
                 @Override
@@ -584,7 +585,17 @@
                 }
 
                 private void processWholeText(String string) {
+                    System.out.println(string);
                     // -- your code here --
+                    collected.add(string);
+                }
+
+                @Override
+                public CompletionStage<?> onClose(WebSocket webSocket,
+                                                  int statusCode,
+                                                  String reason) {
+                    actual.complete(collected);
+                    return null;
                 }
             };