-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Convert Akka.Cluster.Tests.MultiNode specs to async #7755
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
7dfe6fa to
0ab9059
Compare
- Convert all test methods to async Task - Replace TestConductor blocking calls with async versions - Replace EnterBarrier with EnterBarrierAsync - Use RunOnAsync for async operations - Use WithinAsync for async timing constraints - Add using System.Threading.Tasks - Update migration tracking document - Fix all non-awaited RunOn calls inside async contexts - Remove unnecessary async/await patterns with Task.CompletedTask NOTE: UnreachableNodeJoinsAgainSpec has a known issue where the victim node is shut down mid-test and cannot participate in async coordination. This test may require special handling. This migration prevents thread pool starvation and improves test reliability in CI environments. Specs migrated: - AttemptSysMsgRedeliverySpec - ClientDowningNodeThatIsUnreachableSpec - ClusterDeathWatchSpec - ConvergenceSpec - LeaderDowningAllOtherNodesSpec - LeaderDowningNodeThatIsUnreachableSpec - SingletonClusterSpec - SplitBrainResolverDowningSpec - SplitBrainSpec - SurviveNetworkInstabilitySpec - UnreachableNodeJoinsAgainSpec (with known issue)
0ab9059 to
7ec4c5f
Compare
This test has a unique pattern where the victim node is completely shut down and restarted mid-test. This pattern is incompatible with async coordination as the victim node cannot participate in async barriers after shutdown. Keeping this test synchronous to maintain its functionality.
Update: UnreachableNodeJoinsAgainSpec RevertedAfter thorough testing, I've reverted
This pattern is fundamentally incompatible with async coordination because:
Current Status:
All other tests in this batch have been successfully migrated and are working correctly with the async patterns. I've saved a detailed debugging analysis for future reference with all the attempted solutions and why they failed. |
Arkatufus
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
The |
Summary
Changes
Test Files Migrated
AttemptSysMsgRedeliverySpecClientDowningNodeThatIsUnreachableSpecClusterDeathWatchSpecConvergenceSpecLeaderDowningAllOtherNodesSpecLeaderDowningNodeThatIsUnreachableSpecSingletonClusterSpecSplitBrainResolverDowningSpecSplitBrainSpecSurviveNetworkInstabilitySpecUnreachableNodeJoinsAgainSpecMigration Pattern Applied
using System.Threading.Tasks;importpublic voidtopublic async TaskEnterBarrier()withawait EnterBarrierAsync()TestConductor.X().Wait()withawait TestConductor.XAsync()RunOn()withawait RunOnAsync()for async operationsWithin()withawait WithinAsync()for async timing constraintsTest Plan
Related
MULTINODE_TEST_ASYNC_MIGRATION.md