diff --git a/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/WebSocketServletRFCTest.java b/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/WebSocketServletRFCTest.java index 284c1608766..850c10b7cfb 100644 --- a/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/WebSocketServletRFCTest.java +++ b/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/WebSocketServletRFCTest.java @@ -44,8 +44,6 @@ public class WebSocketServletRFCTest public void registerWebSockets(WebSocketServerFactory factory) { factory.register(RFCSocket.class); - - factory.getPolicy().setMaxIdleTime(800); } } diff --git a/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/blockhead/BlockheadClient.java b/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/blockhead/BlockheadClient.java index 4c52615fc8f..061b2c206e0 100644 --- a/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/blockhead/BlockheadClient.java +++ b/jetty-websocket/websocket-server/src/test/java/org/eclipse/jetty/websocket/server/blockhead/BlockheadClient.java @@ -221,12 +221,13 @@ public class BlockheadClient implements Parser.Listener int startCount = incomingFrameQueue.size(); ByteBuffer buf = bufferPool.acquire(policy.getBufferSize(),false); - BufferUtil.clear(buf); + BufferUtil.clearToFill(buf); try { + long msDur = TimeUnit.MILLISECONDS.convert(timeoutDuration,timeoutUnit); long now = System.currentTimeMillis(); - long expireOn = now + TimeUnit.MILLISECONDS.convert(timeoutDuration,timeoutUnit); - LOG.debug("Now: {} - expireOn: {}",now,expireOn); + long expireOn = now + msDur; + LOG.debug("Now: {} - expireOn: {} ({} ms)",now,expireOn,msDur); int len = 0; while (incomingFrameQueue.size() < (startCount + expectedCount))