pjfanning opened a new pull request, #495: URL: https://github.com/apache/pekko-persistence-cassandra/pull/495
### Motivation Three specs create an `ActorSystem` that is never terminated, so it lives for the rest of the test JVM run: - `PubSubThrottlerSpec` — no `afterAll` at all. - `ReconnectSpec` — no `afterAll` at all, and the worse of the two: its driver is configured with `advanced.reconnect-on-init = true` against a port whose Cassandra container is stopped at the end of the test, so its reconnection threads carry on afterwards. - `AbstractEventsByTagMigrationSpec` — shuts down `systemTwo` and `systemThree` but not `migrationSystem`. ### Modification Shut the `ActorSystem` down in `afterAll` in all three specs. `PubSubThrottlerSpec` uses `verifySystemShutdown = true`; `ReconnectSpec` deliberately does not, since its driver is left reconnecting to a Cassandra that has been stopped and verifying would risk a flake. ### Result The suites release their `ActorSystem`s instead of leaving them running for the rest of the test JVM. ### Tests - `sbt "core/Test/testOnly org.apache.pekko.persistence.cassandra.journal.PubSubThrottlerSpec"` — passed, including the verified shutdown. - `sbt "core/Test/compile"` — passed. - `scalafmt --mode diff-ref=upstream/main --list` — no changes needed. - `git diff --check` — clean. - `ReconnectSpec` and `EventsByTagMigrationSpec` not run — they need Cassandra/docker, not available locally. ### References None - resource leak found while auditing actor and session lifecycles. -- 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]
