LocalPubSubSpec: allow multiple debug messages (#30434)
* Fix MailboxSelectorSpec race The comment already said there could be 2 dead letters, but the log assertion failed when there was a second 'excess' one. Add a flag to skip checking for excess log lines. * LocalPubSubSpec: allow multiple debug messages Fixes #30432 on top of #30429
This commit is contained in:
parent
7faa33ff54
commit
f3fb2a577d
1 changed files with 6 additions and 5 deletions
|
|
@ -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"))
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue