--- 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;
}
};