Skip to content

Commit

Permalink
[apache/helix] -- Added more cluster event types in case of No-Op.
Browse files Browse the repository at this point in the history
  • Loading branch information
himanshukandwal committed Oct 10, 2023
1 parent ab4ea90 commit 56b0698
Showing 1 changed file with 23 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,15 +175,36 @@ public void testShouldNoOp() {
Mockito.when(dataProvider.getWagedInstanceCapacity()).thenReturn(instanceCapacity);

Assert.assertTrue(WagedInstanceCapacityManager.shouldNoOp(
dataProvider, _resourceMap, new ClusterEvent(ClusterEventType.TaskCurrentStateChange)));
dataProvider, _resourceMap, new ClusterEvent(ClusterEventType.CustomizedStateChange)));
Assert.assertTrue(WagedInstanceCapacityManager.shouldNoOp(
dataProvider, _resourceMap, new ClusterEvent(ClusterEventType.MessageChange)));
dataProvider, _resourceMap, new ClusterEvent(ClusterEventType.CustomizedViewChange)));
Assert.assertTrue(WagedInstanceCapacityManager.shouldNoOp(
dataProvider, _resourceMap, new ClusterEvent(ClusterEventType.CustomizeStateConfigChange)));
Assert.assertTrue(WagedInstanceCapacityManager.shouldNoOp(
dataProvider, _resourceMap, new ClusterEvent(ClusterEventType.ExternalViewChange)));
Assert.assertTrue(WagedInstanceCapacityManager.shouldNoOp(
dataProvider, _resourceMap, new ClusterEvent(ClusterEventType.IdealStateChange)));
Assert.assertTrue(WagedInstanceCapacityManager.shouldNoOp(
dataProvider, _resourceMap, new ClusterEvent(ClusterEventType.OnDemandRebalance)));
Assert.assertTrue(WagedInstanceCapacityManager.shouldNoOp(
dataProvider, _resourceMap, new ClusterEvent(ClusterEventType.Resume)));
Assert.assertTrue(WagedInstanceCapacityManager.shouldNoOp(
dataProvider, _resourceMap, new ClusterEvent(ClusterEventType.RetryRebalance)));
Assert.assertTrue(WagedInstanceCapacityManager.shouldNoOp(
dataProvider, _resourceMap, new ClusterEvent(ClusterEventType.StateVerifier)));
Assert.assertTrue(WagedInstanceCapacityManager.shouldNoOp(
dataProvider, _resourceMap, new ClusterEvent(ClusterEventType.TargetExternalViewChange)));
Assert.assertTrue(WagedInstanceCapacityManager.shouldNoOp(
dataProvider, _resourceMap, new ClusterEvent(ClusterEventType.TaskCurrentStateChange)));

Assert.assertFalse(WagedInstanceCapacityManager.shouldNoOp(
dataProvider, _resourceMap, new ClusterEvent(ClusterEventType.LiveInstanceChange)));
Assert.assertFalse(WagedInstanceCapacityManager.shouldNoOp(
dataProvider, _resourceMap, new ClusterEvent(ClusterEventType.CurrentStateChange)));
Assert.assertFalse(WagedInstanceCapacityManager.shouldNoOp(
dataProvider, _resourceMap, new ClusterEvent(ClusterEventType.MessageChange)));
Assert.assertFalse(WagedInstanceCapacityManager.shouldNoOp(
dataProvider, _resourceMap, new ClusterEvent(ClusterEventType.PeriodicalRebalance)));
}

// -- static helpers
Expand Down

0 comments on commit 56b0698

Please sign in to comment.