diff --git a/akka-actor-typed-tests/src/test/scala/akka/actor/typed/pubsub/LocalPubSubSpec.scala b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/pubsub/LocalPubSubSpec.scala index c55893645c..e82fe3475c 100644 --- a/akka-actor-typed-tests/src/test/scala/akka/actor/typed/pubsub/LocalPubSubSpec.scala +++ b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/pubsub/LocalPubSubSpec.scala @@ -19,7 +19,7 @@ class LocalPubSubSpec extends ScalaTestWithActorTestKit with AnyWordSpecLike wit "publish to all local subscriber actors of a topic" in { val fruitTopic = - LoggingTestKit.debug("Topic list updated").expect { + LoggingTestKit.debug("Topic list updated").withCheckExcess(false).expect { testKit.spawn(Topic[String]("fruit")) } @@ -50,9 +50,10 @@ class LocalPubSubSpec extends ScalaTestWithActorTestKit with AnyWordSpecLike wit } "publish to all subscriber actors across several instances of the same topic" in { - val (fruitTopic1, fruitTopic2) = LoggingTestKit.debug("Topic list updated").withOccurrences(2).expect { - (testKit.spawn(Topic[String]("fruit")), testKit.spawn(Topic[String]("fruit"))) - } + val (fruitTopic1, fruitTopic2) = + LoggingTestKit.debug("Topic list updated").withOccurrences(2).withCheckExcess(false).expect { + (testKit.spawn(Topic[String]("fruit")), testKit.spawn(Topic[String]("fruit"))) + } try { val probe1 = testKit.createTestProbe[String]() @@ -126,7 +127,7 @@ class LocalPubSubSpec extends ScalaTestWithActorTestKit with AnyWordSpecLike wit "doesn't publish after unsubscribe" in { val fruitTopic = - LoggingTestKit.debug("Topic list updated").expect { + LoggingTestKit.debug("Topic list updated").withCheckExcess(false).expect { testKit.spawn(Topic[String]("fruit")) }