=htt - Improve stability of ClientServerSpec
This commit is contained in:
parent
20f54435f1
commit
4c4a7b0c7f
1 changed files with 3 additions and 6 deletions
|
|
@ -168,12 +168,9 @@ class ClientServerSpec extends WordSpec with Matchers with BeforeAndAfterAll {
|
||||||
val serverReceivedRequestAtNanos = Await.result(receivedRequest.future, 2.seconds)
|
val serverReceivedRequestAtNanos = Await.result(receivedRequest.future, 2.seconds)
|
||||||
|
|
||||||
// waiting for the timeout to happen on the client
|
// waiting for the timeout to happen on the client
|
||||||
Try(Await.result(clientsResponseFuture, 2.second)).recoverWith {
|
intercept[StreamTcpException] { Await.result(clientsResponseFuture, 2.second) }
|
||||||
case _: StreamTcpException ⇒ Success(System.nanoTime())
|
|
||||||
case other: Throwable ⇒ Failure(other)
|
(System.nanoTime() - serverReceivedRequestAtNanos).millis should be >= theIdleTimeout
|
||||||
}.get
|
|
||||||
val diff = System.nanoTime() - serverReceivedRequestAtNanos
|
|
||||||
diff should be > theIdleTimeout.toNanos
|
|
||||||
}
|
}
|
||||||
|
|
||||||
"log materialization errors in `bindAndHandle`" which {
|
"log materialization errors in `bindAndHandle`" which {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue