Skip to content

Commit

Permalink
[netty#2744] Fix flakey HashedWheelTimerTest.testExecutionOnTime()
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Norman Maurer committed Aug 6, 2014
1 parent a9ae80f commit d5fd572
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public void run(final Timeout timeout) throws Exception {
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>();

Expand Down

0 comments on commit d5fd572

Please sign in to comment.