diff --git a/akka-actor-tests/src/test/scala/akka/io/TcpConnectionSpec.scala b/akka-actor-tests/src/test/scala/akka/io/TcpConnectionSpec.scala index 64643cda24..165a0da501 100644 --- a/akka-actor-tests/src/test/scala/akka/io/TcpConnectionSpec.scala +++ b/akka-actor-tests/src/test/scala/akka/io/TcpConnectionSpec.scala @@ -504,8 +504,8 @@ class TcpConnectionSpec extends AkkaSpec("akka.io.tcp.register-timeout = 500ms") watch(connectionActor) EventFilter[DeathPactException](occurrences = 1) intercept { system.stop(connectionHandler.ref) - expectMsgType[Terminated].actor must be(connectionHandler.ref) - expectMsgType[Terminated].actor must be(connectionActor) + val deaths = Set(expectMsgType[Terminated].actor, expectMsgType[Terminated].actor) + deaths must be(Set(connectionHandler.ref, connectionActor)) } } }