Add TestInstanceOperationEvacuationCancel with independent tests#153
Merged
proud-parselmouth merged 3 commits intoApr 16, 2026
Merged
Conversation
3 tasks
ngngwr
reviewed
Apr 10, 2026
| _gSetupTool.getClusterManagementTool() | ||
| .manuallyEnableMaintenanceMode(CLUSTER_NAME, true, null, null); | ||
| String newParticipantName = PARTICIPANT_PREFIX + "_" + _nextStartPort.get(); | ||
| addParticipant(newParticipantName); |
Collaborator
There was a problem hiding this comment.
This new Participants needs to be cleaned up. The base class before method just restores it if particiapnt are less but never trims them so this test can cause flakiness for others
// 5. Restore participant count to START_NUM_NODE
while (_participants.size() < START_NUM_NODE) {
addParticipant(PARTICIPANT_PREFIX + "_" + _nextStartPort.get());
}
Collaborator
Author
There was a problem hiding this comment.
Added the fix at the end of method to syncstop the participant.
Before method removes all offline or inactive participants.
ngngwr
reviewed
Apr 10, 2026
Collaborator
ngngwr
left a comment
There was a problem hiding this comment.
Minor comment. Rest looks good to me.
8445cd8 to
4712b3b
Compare
Base automatically changed from
anubagar/TestInstanceOperationSwapDisabledPartitions
to
dev
April 16, 2026 06:49
Extract 3 evacuation-cancel tests from TestInstanceOperation into TestInstanceOperationEvacuationCancel extending TestInstanceOperationBase: - testEvacuateAndCancelBeforeBootstrapFinish (cancel during slow bootstrap) - testEvacuateAndCancelBeforeDropFinish (cancel during slow drop) - testMarkEvacuationAfterEMM (evacuate during/after maintenance mode) All tests run independently with no dependsOnMethods chains. Tests call enabledTopologyAwareRebalance() explicitly. Both bootstrap and drop tests create extra MasterSlave resources to match the original test environment. testMarkEvacuationAfterEMM uses a 60s verifier for isReadyForPreparing JoiningCluster since delayed drop transitions need time to complete. TestInstanceOperation is not modified. Made-with: Cursor
Extract duplicated resource creation into createAdditionalMasterSlaveResources() helper method. Add comments explaining _stateModelDelay sign convention (negative = slow upward transitions, positive = slow downward transitions) and why cluster convergence succeeds only because state transition cancellation is triggered by the ENABLE operation. Made-with: Cursor
19b1e52 to
deb4797
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issues
This PR is part of the TestInstanceOperation dependency chain reduction effort. See TestInstanceOperation Dependency Chain Reduction for full analysis. Depends on #152
Description
What: Extracts 3 evacuation cancellation tests from the monolithic
TestInstanceOperationinto a new independent test classTestInstanceOperationEvacuationCancel, extendingTestInstanceOperationBase.How:
TestInstanceOperationEvacuationCancel.javawith 3 tests extracted fromTestInstanceOperation:testEvacuateAndCancelBeforeBootstrapFinish— set EVACUATE on an instance, cancel it before bootstrap transitions finish, verify the instance remains in the cluster and partitions rebalance backtestEvacuateAndCancelBeforeDropFinish— set EVACUATE on an instance with delayed state model, cancel it before drop transitions finish, verify the instance remains and partitions recovertestMarkEvacuationAfterEMM— enter maintenance mode, mark an instance for evacuation, exit maintenance mode, verify evacuation completes and the instance is ready for decommissionenabledTopologyAwareRebalance()at its start to be fully self-contained (the base class@BeforeMethoddisables it by default).dependsOnMethodschains — every test runs independently.testEvacuateAndCancelBeforeDropFinish, explicitly adds two extra MasterSlave resources (TEST_DB3_DELAYED_CRUSHED,TEST_DB4_DELAYED_WAGED) to match the original test environment and ensure evacuation has enough work to properly test delayed drop transitions.testMarkEvacuationAfterEMM, wraps theisReadyForPreparingJoiningClustercheck in averifier()call with increased timeout (60s) to allow delayed state transitions to complete.TestInstanceOperation.javais not modified in this PR.Tests
TestInstanceOperationEvacuationCancel.testEvacuateAndCancelBeforeBootstrapFinishTestInstanceOperationEvacuationCancel.testEvacuateAndCancelBeforeDropFinishTestInstanceOperationEvacuationCancel.testMarkEvacuationAfterEMMmvn testcommand on the appropriate module:(If CI test fails due to known issue, please specify the issue and test PR locally. Then copy & paste the result of "mvn test" to here.)
Changes that Break Backward Compatibility (Optional)
(Consider including all behavior changes for public methods or API. Also include these changes in merge description so that other developers are aware of these changes. This allows them to make relevant code changes in feature branches accounting for the new method/API behavior.)
Documentation (Optional)
(Link the GitHub wiki you added)
Commits
Code Quality
(helix-style-intellij.xml if IntelliJ IDE is used)