Skip to content

Commit 4300a7e

Browse files
committed
Nit
1 parent 048823c commit 4300a7e

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

helix-core/src/test/java/org/apache/helix/integration/TestPartitionMovementThrottle.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ public void testResourceThrottle() throws Exception {
156156
_participants[i].syncStart();
157157
}
158158

159-
// Wait for cluster to stabilize using proper verification instead of fixed sleep
159+
// Wait for cluster to stabilize
160160
Assert.assertTrue(_clusterVerifier.verifyByPolling());
161161

162162
boolean allTransitionsRecorded = TestHelper.verify(() -> {
@@ -169,7 +169,7 @@ public void testResourceThrottle() throws Exception {
169169
}
170170
}
171171
return true;
172-
}, 10000); // 10 second timeout for transition recording
172+
}, 10000);
173173

174174
Assert.assertTrue(allTransitionsRecorded,
175175
"Transition tracking data was not properly recorded for all resources");

helix-core/src/test/java/org/apache/helix/integration/controller/TestClusterMaintenanceMode.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public void testMaintenanceModeAddNewInstance() {
110110

111111
@Test
112112
public void testMaintenanceModeAddNewResource() throws Exception {
113-
// Explicitly enter maintenance mode
113+
// Enter maintenance mode
114114
_gSetupTool.getClusterManagementTool().enableMaintenanceMode(CLUSTER_NAME, true, TestHelper.getTestMethodName());
115115

116116
// Verify we're in maintenance mode
@@ -122,11 +122,10 @@ public void testMaintenanceModeAddNewResource() throws Exception {
122122
IdealState.RebalanceMode.FULL_AUTO.name(), CrushEdRebalanceStrategy.class.getName());
123123
_gSetupTool.getClusterManagementTool().rebalance(CLUSTER_NAME,
124124
newResourceAddedDuringMaintenanceMode, 3);
125+
125126
// In maintenance mode, new resources won't get ExternalView populated (no rebalance happens).
126-
// Instead of using _clusterVerifier.verifyByPolling() which would timeout,
127-
// we wait for the IdealState to be created and then verify that ExternalView remains null.
128127

129-
// Wait longer for IdealState to be created during maintenance mode
128+
// Wait for IdealState to be created during maintenance mode
130129
boolean idealStateCreated = TestHelper.verify(() -> {
131130
IdealState idealState = _gSetupTool.getClusterManagementTool()
132131
.getResourceIdealState(CLUSTER_NAME, newResourceAddedDuringMaintenanceMode);
@@ -148,7 +147,6 @@ public void testMaintenanceModeAddNewResource() throws Exception {
148147
.getResourceExternalView(CLUSTER_NAME, newResourceAddedDuringMaintenanceMode);
149148

150149
// During maintenance mode, ExternalView should NOT be created for new resources
151-
// since the management mode pipeline excludes ExternalViewComputeStage
152150
Assert.assertNull(externalView,
153151
"ExternalView should be null during maintenance mode for resource created after entering maintenance mode: "
154152
+ newResourceAddedDuringMaintenanceMode);

0 commit comments

Comments
 (0)