=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"
This commit is contained in:
Konrad 'ktoso' Malawski 2014-07-23 14:03:19 +02:00
parent ad2a800298
commit c76b8a0338

View file

@ -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(_) }
}
}