From c76b8a0338d7d2017ee3b2c7b4368b8d205d5d38 Mon Sep 17 00:00:00 2001 From: Konrad 'ktoso' Malawski Date: Wed, 23 Jul 2014 14:03:19 +0200 Subject: [PATCH] =con #15574 impr TimerBasedThrottlerSpec stability * the lower bound was rather racy, depends on "where in it's Tick" time the throtteler currently was. In general the upper bound is also not exact, but "good enough" because the `.5` is an estimation of "the throtteler must finish it's previous tick, and then it sends the data" --- .../scala/akka/contrib/throttle/TimerBasedThrottlerSpec.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/akka-contrib/src/test/scala/akka/contrib/throttle/TimerBasedThrottlerSpec.scala b/akka-contrib/src/test/scala/akka/contrib/throttle/TimerBasedThrottlerSpec.scala index f549dc97f1..a739ecc48e 100644 --- a/akka-contrib/src/test/scala/akka/contrib/throttle/TimerBasedThrottlerSpec.scala +++ b/akka-contrib/src/test/scala/akka/contrib/throttle/TimerBasedThrottlerSpec.scala @@ -87,7 +87,7 @@ class TimerBasedThrottlerSpec extends TestKit(ActorSystem("TimerBasedThrottlerSp expectNoMsg(1 second) throttler ! SetTarget(Some(echo)) 4 to 7 foreach { throttler ! _ } - within(0.5 seconds, 1.5 seconds) { + within(1.5 seconds) { 4 to 7 foreach { expectMsg(_) } } } @@ -104,7 +104,7 @@ class TimerBasedThrottlerSpec extends TestKit(ActorSystem("TimerBasedThrottlerSp } expectNoMsg(1 second) throttler ! SetTarget(Some(echo)) - within(0.5 seconds, 1.5 seconds) { + within(1.5 seconds) { 4 to 7 foreach { expectMsg(_) } } }