Copilot commented on code in PR #3676:
URL: https://github.com/apache/pekko/pull/3676#discussion_r4362575805
##########
remote/src/test/scala/org/apache/pekko/remote/artery/RemoteConnectionSpec.scala:
##########
@@ -46,6 +46,20 @@ class RemoteConnectionSpec extends
ArteryMultiNodeSpec("pekko.remote.retry-gate-
case w: Logging.Warning => w.message.toString.startsWith("UID collision
old [")
}
+ private def quarantinedProbe(system: ActorSystem): TestProbe = {
+ val probe = new TestProbe(system)
+ system.eventStream.subscribe(probe.ref,
classOf[ThisActorSystemQuarantinedEvent])
+ probe
+ }
Review Comment:
The probe is subscribed to the system event stream but never unsubscribed.
If the same `ActorSystem` instance lives across multiple test cases in this
spec, these subscriptions can accumulate and make later tests harder to reason
about (extra unexpected messages, harder-to-debug failures). Consider
unsubscribing after the assertion (or registering cleanup via test lifecycle
hooks) so each test leaves the event stream in a clean state.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]