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 b58c7f5dd64..570be3b53b4 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 @@ -212,11 +212,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)