[#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
This commit is contained in:
Norman Maurer 2014-08-06 07:01:24 +02:00
parent 653262d2af
commit 7022dcd4a1

View File

@ -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<Long> queue = new LinkedBlockingQueue<Long>();