Harden StreamTestKitSpec #24956

This commit is contained in:
Christopher Batey 2018-04-24 12:24:53 +01:00 committed by Johan Andrén
parent b6a27deaea
commit 59ed3b353f

View file

@ -145,12 +145,13 @@ class StreamTestKitSpec extends AkkaSpec {
"#expectNextWithTimeoutPF should fail after timeout when element delayed" in {
intercept[AssertionError] {
val timeout = 100.millis
val overTimeout = timeout + (10.millis)
val overTimeout = timeout + 50.millis
Source.tick(overTimeout, 1.millis, 1).runWith(TestSink.probe)
.request(1)
.expectNextWithTimeoutPF(timeout, {
case 1
})
}.getMessage should include("timeout")
}