Source:
<code>public void testResourceSubset() throws InterruptedException { String testDB = "resource-testDB"; _setupTool.addResourceToCluster(_clusterName, testDB, 1, BuiltInStateModelDefinitions.MasterSlave.name(), RebalanceMode.SEMI_AUTO.toString()); IdealState idealState = _admin.getResourceIdealState(_clusterName, testDB); idealState.setReplicas(Integer.toString(2)); idealState.getRecord().setListField(testDB + "_0", Arrays.asList(_participants[1].getInstanceName(), _participants[2].getInstanceName())); _admin.setResourceIdealState(_clusterName, testDB, idealState); _admin.enableInstance(_clusterName, "localhost_12918", false); ZkHelixClusterVerifier verifier = new BestPossibleExternalViewVerifier.Builder(_clusterName).setZkClient(_gZkClient) .setResources(Sets.newHashSet(testDB)).build(); Assert.assertTrue(verifier.verifyByPolling()); <START> _admin.enableCluster(_clusterName, false); <END> _admin.enableInstance(_clusterName, "localhost_12918", true); verifier = new StrictMatchExternalViewVerifier.Builder(_clusterName).setZkClient(_gZkClient) .setResources(Sets.newHashSet(testDB)).build(); Assert.assertTrue(verifier.verifyByPolling()); verifier = new BestPossibleExternalViewVerifier.Builder(_clusterName).setZkClient(_gZkClient).build(); Assert.assertFalse(verifier.verify(3000)); verifier = new StrictMatchExternalViewVerifier.Builder(_clusterName).setZkClient(_gZkClient).build(); Assert.assertFalse(verifier.verify(3000)); _admin.enableCluster(_clusterName, true); }</code><technical_language>This changes purpose of this test. BestPossibleExternalViewVerifier StrictMatchExternalViewVerifier tested condition. do need move 2 changes BestPossibleExternalViewVerifier verifying pass</technical_language>

Target:
public void testResourceSubset() throws InterruptedException { String testDB = "resource-testDB"; _setupTool.addResourceToCluster(_clusterName, testDB, 1, BuiltInStateModelDefinitions.MasterSlave.name(), RebalanceMode.SEMI_AUTO.toString()); IdealState idealState = _admin.getResourceIdealState(_clusterName, testDB); idealState.setReplicas(Integer.toString(2)); idealState.getRecord().setListField(testDB + "_0", Arrays.asList(_participants[1].getInstanceName(), _participants[2].getInstanceName())); _admin.setResourceIdealState(_clusterName, testDB, idealState); _admin.enableInstance(_clusterName, "localhost_12918", false); ZkHelixClusterVerifier verifier = new BestPossibleExternalViewVerifier.Builder(_clusterName).setZkClient(_gZkClient) .setResources(Sets.newHashSet(testDB)).build(); Assert.assertTrue(verifier.verifyByPolling()); _admin.enableCluster(_clusterName, false); _admin.enableInstance(_clusterName, "localhost_12918", true); verifier = new BestPossibleExternalViewVerifier.Builder(_clusterName).setZkClient(_gZkClient) .setResources(Sets.newHashSet(testDB)).build(); Assert.assertTrue(verifier.verifyByPolling()); verifier = new StrictMatchExternalViewVerifier.Builder(_clusterName).setZkClient(_gZkClient) .setResources(Sets.newHashSet(testDB)).build(); Assert.assertTrue(verifier.verifyByPolling()); verifier = new BestPossibleExternalViewVerifier.Builder(_clusterName).setZkClient(_gZkClient).build(); Assert.assertFalse(verifier.verify(3000)); verifier = new StrictMatchExternalViewVerifier.Builder(_clusterName).setZkClient(_gZkClient).build(); Assert.assertFalse(verifier.verify(3000)); _admin.enableCluster(_clusterName, true); }