diff --git a/multi-node-testkit/src/main/scala/org/apache/pekko/remote/testconductor/Player.scala b/multi-node-testkit/src/main/scala/org/apache/pekko/remote/testconductor/Player.scala index c81371e56f8..01db67b685b 100644 --- a/multi-node-testkit/src/main/scala/org/apache/pekko/remote/testconductor/Player.scala +++ b/multi-node-testkit/src/main/scala/org/apache/pekko/remote/testconductor/Player.scala @@ -216,11 +216,11 @@ private[pekko] class ClientFSM(name: RoleName, controllerAddr: InetSocketAddress case Event(Done, _) => log.debug("received Done: starting test") goto(Connected) + case Event(msg: ServerOp, _) => + stay().replying(Status.Failure(new IllegalStateException(s"not connected yet but received $msg"))) case Event(msg: NetworkOp, _) => log.error("received {} instead of Done", msg) goto(Failed) - case Event(_: ServerOp, _) => - stay().replying(Status.Failure(new IllegalStateException("not connected yet"))) case Event(StateTimeout, _) => log.error("connect timeout to TestConductor") goto(Failed)