From 2ea0bca3331731dd74aaba0ce4f9e8c26d02a534 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Tue, 11 Jun 2019 13:10:55 -0500 Subject: [PATCH] Cleanup of testcase, unable to replicate failure. Signed-off-by: Joakim Erdfelt --- .../tests/WebSocketConnectionStatsTest.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/jetty-websocket/jetty-websocket-tests/src/test/java/org/eclipse/jetty/websocket/tests/WebSocketConnectionStatsTest.java b/jetty-websocket/jetty-websocket-tests/src/test/java/org/eclipse/jetty/websocket/tests/WebSocketConnectionStatsTest.java index 7899e156f6a..776d59a31b0 100644 --- a/jetty-websocket/jetty-websocket-tests/src/test/java/org/eclipse/jetty/websocket/tests/WebSocketConnectionStatsTest.java +++ b/jetty-websocket/jetty-websocket-tests/src/test/java/org/eclipse/jetty/websocket/tests/WebSocketConnectionStatsTest.java @@ -71,13 +71,11 @@ public class WebSocketConnectionStatsTest public void onOpen(Session session) { behavior = session.getPolicy().getBehavior().name(); - System.err.println(toString() + " Socket Connected: " + session); } @OnWebSocketClose public void onClose(int statusCode, String reason) { - System.err.println(toString() + " Socket Closed: " + statusCode + ":" + reason); closed.countDown(); } @@ -109,7 +107,7 @@ public class WebSocketConnectionStatsTest @Override public void configure(WebSocketServletFactory factory) { - factory.setCreator((req, resp)->new EchoSocket()); + factory.setCreator((req, resp) -> new EchoSocket()); } } @@ -164,7 +162,7 @@ public class WebSocketConnectionStatsTest { ByteBufferPool bufferPool = new MappedByteBufferPool(); Generator generator = new Generator(WebSocketPolicy.newClientPolicy(), bufferPool); - ByteBuffer buffer = bufferPool.acquire(frame.getPayloadLength()+10, true); + ByteBuffer buffer = bufferPool.acquire(frame.getPayloadLength() + 10, true); int pos = BufferUtil.flipToFill(buffer); generator.generateWholeFrame(frame, buffer); return buffer.position() - pos; @@ -189,8 +187,10 @@ public class WebSocketConnectionStatsTest upgradeSentBytes = statistics.getSentBytes(); upgradeReceivedBytes = statistics.getReceivedBytes(); - for (int i=0; i