kaisun2000 commented on a change in pull request #1449:
URL: https://github.com/apache/helix/pull/1449#discussion_r501286984
##########
File path:
helix-core/src/test/java/org/apache/helix/integration/rebalancer/TestSemiAutoRebalance.java
##########
@@ -92,33 +95,11 @@ public void beforeClass() throws InterruptedException {
_controller = new ClusterControllerManager(ZK_ADDR, CLUSTER_NAME,
controllerName);
_controller.syncStart();
- Thread.sleep(1000);
-
- // verify ideal state and external view
- IdealState idealState =
_accessor.getProperty(_keyBuilder.idealStates(DB_NAME));
- Assert.assertNotNull(idealState);
- Assert.assertEquals(idealState.getNumPartitions(), PARTITION_NUMBER);
- for (String partition : idealState.getPartitionSet()) {
- List<String> preferenceList = idealState.getPreferenceList(partition);
- Assert.assertNotNull(preferenceList);
- Assert.assertEquals(preferenceList.size(), REPLICA_NUMBER);
- }
-
- ExternalView externalView =
_accessor.getProperty(_keyBuilder.externalView(DB_NAME));
- Assert.assertNotNull(externalView);
- Assert.assertEquals(externalView.getPartitionSet().size(),
PARTITION_NUMBER);
- for (String partition : externalView.getPartitionSet()) {
- Map<String, String> stateMap = externalView.getStateMap(partition);
- Assert.assertEquals(stateMap.size(), REPLICA_NUMBER);
-
- int masters = 0;
- for (String state : stateMap.values()) {
- if (state.equals(MasterSlaveSMD.States.MASTER.name())) {
- ++masters;
- }
- }
- Assert.assertEquals(masters, 1);
- }
+ ZkHelixClusterVerifier verifier = new
BestPossibleExternalViewVerifier.Builder(CLUSTER_NAME)
Review comment:
replaced by line 102. The previous way is really too old. Older than
deprecated ClusterVerifier and it does not work sometimes.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]