=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:
parent
ad2a800298
commit
c76b8a0338
1 changed files with 2 additions and 2 deletions
|
|
@ -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(_) }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue