From d5fd57262b9877a0f5b035a7c019d576ee1c60f3 Mon Sep 17 00:00:00 2001 From: Norman Maurer Date: Wed, 6 Aug 2014 07:01:24 +0200 Subject: [PATCH] [#2744] Fix flakey HashedWheelTimerTest.testExecutionOnTime() Motivation: The calculation of the max wait time for HashedWheelTimerTest.testExecutionOnTime() was wrong and so the test sometimes failed. Modifications: Fix the max wait time. Result: No more test-failures --- common/src/test/java/io/netty/util/HashedWheelTimerTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/test/java/io/netty/util/HashedWheelTimerTest.java b/common/src/test/java/io/netty/util/HashedWheelTimerTest.java index 50e1ba63ec..d8c2a9c47e 100644 --- a/common/src/test/java/io/netty/util/HashedWheelTimerTest.java +++ b/common/src/test/java/io/netty/util/HashedWheelTimerTest.java @@ -131,7 +131,7 @@ public class HashedWheelTimerTest { public void testExecutionOnTime() throws InterruptedException { int tickDuration = 200; int timeout = 125; - int maxTimeout = tickDuration + timeout + tickDuration; + int maxTimeout = 2 * (tickDuration + timeout); final HashedWheelTimer timer = new HashedWheelTimer(tickDuration, TimeUnit.MILLISECONDS); final BlockingQueue queue = new LinkedBlockingQueue();