From ac2aa0438567ccc861fca43555f4797c18044be5 Mon Sep 17 00:00:00 2001 From: Christopher Batey Date: Tue, 9 Jun 2020 11:18:54 +0100 Subject: [PATCH] LocalPubSubSpec: Stop log being captured from creation The log that's tested is also logged out on initial listing from the receptionist Refs #29197 --- .../scala/akka/actor/typed/pubsub/LocalPubSubSpec.scala | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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 eee5e7985e..9d6984ec6e 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 @@ -50,11 +50,9 @@ class LocalPubSubSpec extends ScalaTestWithActorTestKit with AnyWordSpecLike wit } "publish to all subscriber actors across several instances of the same topic" in { - val fruitTopic1 = - testKit.spawn(Topic[String]("fruit")) - - val fruitTopic2 = - testKit.spawn(Topic[String]("fruit")) + val (fruitTopic1, fruitTopic2) = LoggingTestKit.debug("Topic list updated").withOccurrences(2).expect { + (testKit.spawn(Topic[String]("fruit")), testKit.spawn(Topic[String]("fruit"))) + } try { val probe1 = testKit.createTestProbe[String]()