diff --git a/core/src/test/java/io/undertow/websockets/core/protocol/WebSocketTimeoutTestCase.java b/core/src/test/java/io/undertow/websockets/core/protocol/WebSocketTimeoutTestCase.java index 08a4573550..b6ed4dd8c0 100644 --- a/core/src/test/java/io/undertow/websockets/core/protocol/WebSocketTimeoutTestCase.java +++ b/core/src/test/java/io/undertow/websockets/core/protocol/WebSocketTimeoutTestCase.java @@ -111,7 +111,7 @@ protected void onFullTextMessage(WebSocketChannel channel, BufferedTextMessage m latch.getIoFuture().get(); final long watchStart = System.currentTimeMillis(); - final long watchTimeout = System.currentTimeMillis() + TESTABLE_TIMEOUT_VALUE + 500; + final long watchTimeout = System.currentTimeMillis() + TESTABLE_TIMEOUT_VALUE + 1000; final FutureResult timeoutLatch = new FutureResult(); ReadTimeoutChannelGuard readTimeoutChannelGuard = new ReadTimeoutChannelGuard(client, timeoutLatch, watchTimeout); @@ -124,7 +124,7 @@ protected void onFullTextMessage(WebSocketChannel channel, BufferedTextMessage m } else { long timeSpent = watchTimeEnd - watchStart; //let's be generous and give 150ms diff( there is "fuzz" coded for 50ms in undertow as well - if(!(timeSpent <= TESTABLE_TIMEOUT_VALUE + 150)) { + if(!(timeSpent <= TESTABLE_TIMEOUT_VALUE + 250)) { Assert.fail("Timeout did not happen... in time. Socket timeout out in '" + timeSpent + "' ms, supposed to happen in '" + TESTABLE_TIMEOUT_VALUE + "' ms."); } }