Move akka context swap test to forked#11953
Conversation
There was a problem hiding this comment.
The PR adds @AutoCleanup to ensure actor system cleanup and moves flaky context-swap tests to a forked JVM, but introduces a critical bug in the Akka 2.3 termination logic: it unconditionally calls both shutdown() and awaitTermination(), but awaitTermination() does not exist in Akka 2.3.16, causing the tests to crash with NoSuchMethodException during cleanup.
📊 Validated against 3 scenarios · Open Bits AI session
🤖 Datadog Autotest · Commit 3160ba3 · What is Autotest? · Any feedback? Reach out in #autotest
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3160ba388f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
🎯 Code Coverage (details) 🔗 Commit SHA: 9339edd | Docs | Datadog PR Page | Give us feedback! |
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
|
What Does This Do
This PR fixes the flakiness of akka/pekko context swap. tests. The main issue:
The akka/pekko mailbox was not shutting down properly. It was instantiated with one context mode and then when the configuration switched from one test to another there was:
The second run passed because was on a fresh JVM.
This PR ensures that the actor system cleans nicely on test completion. Also moves those tests to forked for extra safety
Motivation
Additional Notes
Contributor Checklist
type:and (comp:orinst:) labels in addition to any other useful labelsclose,fix, or any linking keywords when referencing an issueUse
solvesinstead, and assign the PR milestone to the issueJira ticket: [PROJ-IDENT]