Skip to content

Conversation

@ngngwr
Copy link
Collaborator

@ngngwr ngngwr commented Sep 22, 2025

Issues

apache#3070

Description

Helix does not allow moving transition from UNKNOWN to EVACUATE

Tests

  • The following tests are written for this issue:

(List the names of added unit/integration tests)

  • The following is the result of the "mvn test" command 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.)

Unit Tested the change

}

@Test(dataProvider = "selfTransitions")
public void testSelfTransitions(InstanceConstants.InstanceOperation state) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this test? can we have the self-transitions as part of always_allowed transitions?

}

@Test
public void testUnknownToEvacuateTransition() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this covered in always_allowed transitions?

}

@Test
public void testEvacuateToUnknownTransition() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same, this is also covered in always_allowed transitions

* Tests all possible transitions between instance operation states to ensure proper
* validation logic and maintain backward compatibility.
*/
public class TestInstanceUtilTransitions {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just have two tests, one for always_allowed, and another for invalid state transitions

* These transitions should be rejected by the validation logic.
*/
@DataProvider
public Object[][] invalidTransitions() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this list exhaustive?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants