From a4461be8a545a9f4cfb9b6dc06977ad0133513e7 Mon Sep 17 00:00:00 2001 From: He-Pin Date: Wed, 6 Sep 2023 20:10:24 +0800 Subject: [PATCH] =test Switch pattern matching cases in Player. (cherry picked from commit 299484d9f812e0f9376201634cfa119f612c4e36) --- .../scala/org/apache/pekko/remote/testconductor/Player.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)