You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@helix.apache.org by jx...@apache.org on 2018/07/14 00:14:33 UTC

[3/8] helix git commit: Fix a couple of tests, and reduce the total test times.

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/integration/rebalancer/PartitionMigration/TestPartitionMigrationBase.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/rebalancer/PartitionMigration/TestPartitionMigrationBase.java b/helix-core/src/test/java/org/apache/helix/integration/rebalancer/PartitionMigration/TestPartitionMigrationBase.java
index 4e9638a..8398efc 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/rebalancer/PartitionMigration/TestPartitionMigrationBase.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/rebalancer/PartitionMigration/TestPartitionMigrationBase.java
@@ -32,9 +32,9 @@ import org.apache.helix.NotificationContext;
 import org.apache.helix.PropertyKey;
 import org.apache.helix.api.listeners.ExternalViewChangeListener;
 import org.apache.helix.api.listeners.IdealStateChangeListener;
+import org.apache.helix.common.ZkTestBase;
 import org.apache.helix.controller.rebalancer.strategy.CrushRebalanceStrategy;
 import org.apache.helix.integration.DelayedTransitionBase;
-import org.apache.helix.common.ZkTestBase;
 import org.apache.helix.integration.manager.ClusterControllerManager;
 import org.apache.helix.integration.manager.MockParticipantManager;
 import org.apache.helix.model.BuiltInStateModelDefinitions;
@@ -42,7 +42,7 @@ import org.apache.helix.model.ClusterConfig;
 import org.apache.helix.model.ExternalView;
 import org.apache.helix.model.IdealState;
 import org.apache.helix.tools.ClusterVerifiers.BestPossibleExternalViewVerifier;
-import org.apache.helix.tools.ClusterVerifiers.HelixClusterVerifier;
+import org.apache.helix.tools.ClusterVerifiers.ZkHelixClusterVerifier;
 import org.testng.annotations.AfterClass;
 import org.testng.annotations.BeforeClass;
 
@@ -59,7 +59,7 @@ public class TestPartitionMigrationBase extends ZkTestBase {
   List<MockParticipantManager> _participants = new ArrayList<>();
   int _replica = 3;
   int _minActiveReplica = _replica - 1;
-  HelixClusterVerifier _clusterVerifier;
+  ZkHelixClusterVerifier _clusterVerifier;
   List<String> _testDBs = new ArrayList<>();
 
   MigrationStateVerifier _migrationVerifier;

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/integration/rebalancer/TestAutoRebalancePartitionLimit.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/rebalancer/TestAutoRebalancePartitionLimit.java b/helix-core/src/test/java/org/apache/helix/integration/rebalancer/TestAutoRebalancePartitionLimit.java
index ba30964..a50e998 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/rebalancer/TestAutoRebalancePartitionLimit.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/rebalancer/TestAutoRebalancePartitionLimit.java
@@ -35,7 +35,6 @@ import org.apache.helix.manager.zk.ZkBaseDataAccessor;
 import org.apache.helix.manager.zk.ZkClient;
 import org.apache.helix.model.ExternalView;
 import org.apache.helix.model.IdealState.RebalanceMode;
-import org.apache.helix.tools.ClusterSetup;
 import org.apache.helix.tools.ClusterStateVerifier;
 import org.apache.helix.tools.ClusterStateVerifier.ZkVerifier;
 import org.slf4j.Logger;

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/integration/rebalancer/TestClusterInMaintenanceModeWhenReachingMaxPartition.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/rebalancer/TestClusterInMaintenanceModeWhenReachingMaxPartition.java b/helix-core/src/test/java/org/apache/helix/integration/rebalancer/TestClusterInMaintenanceModeWhenReachingMaxPartition.java
index c7ef8fa..85454e0 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/rebalancer/TestClusterInMaintenanceModeWhenReachingMaxPartition.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/rebalancer/TestClusterInMaintenanceModeWhenReachingMaxPartition.java
@@ -32,7 +32,7 @@ import org.apache.helix.model.BuiltInStateModelDefinitions;
 import org.apache.helix.model.ClusterConfig;
 import org.apache.helix.model.MaintenanceSignal;
 import org.apache.helix.tools.ClusterVerifiers.BestPossibleExternalViewVerifier;
-import org.apache.helix.tools.ClusterVerifiers.HelixClusterVerifier;
+import org.apache.helix.tools.ClusterVerifiers.ZkHelixClusterVerifier;
 import org.testng.Assert;
 import org.testng.annotations.AfterClass;
 import org.testng.annotations.BeforeClass;
@@ -49,7 +49,7 @@ public class TestClusterInMaintenanceModeWhenReachingMaxPartition extends ZkTest
 
   List<MockParticipantManager> _participants = new ArrayList<MockParticipantManager>();
   int _replica = 3;
-  HelixClusterVerifier _clusterVerifier;
+  ZkHelixClusterVerifier _clusterVerifier;
   List<String> _testDBs = new ArrayList<String>();
   HelixDataAccessor _dataAccessor;
 
@@ -103,7 +103,7 @@ public class TestClusterInMaintenanceModeWhenReachingMaxPartition extends ZkTest
       _testDBs.add(db);
     }
     Thread.sleep(100);
-    Assert.assertTrue(_clusterVerifier.verify());
+    Assert.assertTrue(_clusterVerifier.verifyByPolling());
 
     MaintenanceSignal maintenanceSignal = _dataAccessor.getProperty(_dataAccessor.keyBuilder().maintenance());
     Assert.assertNull(maintenanceSignal);

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/integration/rebalancer/TestClusterInMaintenanceModeWhenReachingOfflineInstancesLimit.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/rebalancer/TestClusterInMaintenanceModeWhenReachingOfflineInstancesLimit.java b/helix-core/src/test/java/org/apache/helix/integration/rebalancer/TestClusterInMaintenanceModeWhenReachingOfflineInstancesLimit.java
index f63769b..902effa 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/rebalancer/TestClusterInMaintenanceModeWhenReachingOfflineInstancesLimit.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/rebalancer/TestClusterInMaintenanceModeWhenReachingOfflineInstancesLimit.java
@@ -23,6 +23,9 @@ import java.lang.management.ManagementFactory;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
+import javax.management.MBeanServerConnection;
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
 import org.apache.helix.ConfigAccessor;
 import org.apache.helix.HelixAdmin;
 import org.apache.helix.HelixDataAccessor;
@@ -36,16 +39,12 @@ import org.apache.helix.model.ClusterConfig;
 import org.apache.helix.model.MaintenanceSignal;
 import org.apache.helix.monitoring.mbeans.MonitorDomainNames;
 import org.apache.helix.tools.ClusterVerifiers.BestPossibleExternalViewVerifier;
-import org.apache.helix.tools.ClusterVerifiers.HelixClusterVerifier;
+import org.apache.helix.tools.ClusterVerifiers.ZkHelixClusterVerifier;
 import org.testng.Assert;
 import org.testng.annotations.AfterClass;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
-import javax.management.MBeanServerConnection;
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-
 import static org.apache.helix.monitoring.mbeans.ClusterStatusMonitor.CLUSTER_DN_KEY;
 
 public class TestClusterInMaintenanceModeWhenReachingOfflineInstancesLimit
@@ -60,7 +59,7 @@ public class TestClusterInMaintenanceModeWhenReachingOfflineInstancesLimit
   private ClusterControllerManager _controller;
 
   private List<MockParticipantManager> _participants = new ArrayList<MockParticipantManager>();
-  private HelixClusterVerifier _clusterVerifier;
+  private ZkHelixClusterVerifier _clusterVerifier;
   private HelixDataAccessor _dataAccessor;
   private int _maxOfflineInstancesAllowed = 4;
 
@@ -103,7 +102,7 @@ public class TestClusterInMaintenanceModeWhenReachingOfflineInstancesLimit
           BuiltInStateModelDefinitions.MasterSlave.name(), _PARTITIONS, 3, 3, -1);
     }
     Thread.sleep(100);
-    Assert.assertTrue(_clusterVerifier.verify());
+    Assert.assertTrue(_clusterVerifier.verifyByPolling());
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/integration/rebalancer/TestCustomIdealState.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/rebalancer/TestCustomIdealState.java b/helix-core/src/test/java/org/apache/helix/integration/rebalancer/TestCustomIdealState.java
index b971e38..7002cf9 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/rebalancer/TestCustomIdealState.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/rebalancer/TestCustomIdealState.java
@@ -21,8 +21,8 @@ package org.apache.helix.integration.rebalancer;
 
 import java.util.Date;
 import org.apache.helix.TestHelper;
-import org.apache.helix.integration.TestDriver;
 import org.apache.helix.common.ZkTestBase;
+import org.apache.helix.integration.TestDriver;
 import org.apache.helix.tools.ClusterSetup;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/integration/rebalancer/TestMixedModeAutoRebalance.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/rebalancer/TestMixedModeAutoRebalance.java b/helix-core/src/test/java/org/apache/helix/integration/rebalancer/TestMixedModeAutoRebalance.java
index 28e112e..29efdee 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/rebalancer/TestMixedModeAutoRebalance.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/rebalancer/TestMixedModeAutoRebalance.java
@@ -28,10 +28,10 @@ import java.util.Set;
 import org.apache.helix.ConfigAccessor;
 import org.apache.helix.HelixDataAccessor;
 import org.apache.helix.NotificationContext;
+import org.apache.helix.common.ZkTestBase;
 import org.apache.helix.controller.rebalancer.strategy.CrushEdRebalanceStrategy;
 import org.apache.helix.controller.rebalancer.strategy.CrushRebalanceStrategy;
 import org.apache.helix.controller.rebalancer.util.RebalanceScheduler;
-import org.apache.helix.common.ZkTestBase;
 import org.apache.helix.integration.manager.ClusterControllerManager;
 import org.apache.helix.integration.manager.MockParticipantManager;
 import org.apache.helix.manager.zk.ZKHelixDataAccessor;
@@ -46,7 +46,7 @@ import org.apache.helix.model.ResourceConfig;
 import org.apache.helix.participant.statemachine.StateModelInfo;
 import org.apache.helix.participant.statemachine.Transition;
 import org.apache.helix.tools.ClusterVerifiers.BestPossibleExternalViewVerifier;
-import org.apache.helix.tools.ClusterVerifiers.HelixClusterVerifier;
+import org.apache.helix.tools.ClusterVerifiers.ZkHelixClusterVerifier;
 import org.testng.Assert;
 import org.testng.annotations.AfterClass;
 import org.testng.annotations.BeforeClass;
@@ -64,7 +64,7 @@ public class TestMixedModeAutoRebalance extends ZkTestBase {
 
   private List<MockParticipantManager> _participants = new ArrayList<>();
   private int _replica = 3;
-  private HelixClusterVerifier _clusterVerifier;
+  private ZkHelixClusterVerifier _clusterVerifier;
   private ConfigAccessor _configAccessor;
   private HelixDataAccessor _dataAccessor;
 
@@ -213,8 +213,7 @@ public class TestMixedModeAutoRebalance extends ZkTestBase {
         Assert.assertTrue(userDefined.equals(preferenceListInIs));
       } else {
         if (userDefined.equals(preferenceListInIs)) {
-          System.out.println("Something is not good!");
-          Thread.sleep(10000000);
+          Assert.fail("Something is not good!");
         }
         Assert.assertFalse(userDefined.equals(preferenceListInIs), String
             .format("Partition %s, List in Is: %s, List as defined in config: %s", p, preferenceListInIs,
@@ -256,6 +255,7 @@ public class TestMixedModeAutoRebalance extends ZkTestBase {
     for (MockParticipantManager participant : _participants) {
       participant.syncStop();
     }
+    _gSetupTool.deleteCluster(CLUSTER_NAME);
     System.out.println("END " + CLASS_NAME + " at " + new Date(System.currentTimeMillis()));
   }
 

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/integration/rebalancer/TestZeroReplicaAvoidance.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/rebalancer/TestZeroReplicaAvoidance.java b/helix-core/src/test/java/org/apache/helix/integration/rebalancer/TestZeroReplicaAvoidance.java
index 267b88b..5283346 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/rebalancer/TestZeroReplicaAvoidance.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/rebalancer/TestZeroReplicaAvoidance.java
@@ -39,7 +39,7 @@ import org.apache.helix.model.IdealState;
 import org.apache.helix.model.Message;
 import org.apache.helix.model.StateModelDefinition;
 import org.apache.helix.tools.ClusterVerifiers.BestPossibleExternalViewVerifier;
-import org.apache.helix.tools.ClusterVerifiers.HelixClusterVerifier;
+import org.apache.helix.tools.ClusterVerifiers.ZkHelixClusterVerifier;
 import org.testng.Assert;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
@@ -52,7 +52,7 @@ public class TestZeroReplicaAvoidance extends ZkTestBase implements
   final String CLUSTER_NAME = CLUSTER_PREFIX + "_" + CLASS_NAME;
 
   List<MockParticipantManager> _participants = new ArrayList<MockParticipantManager>();
-  HelixClusterVerifier _clusterVerifier;
+  ZkHelixClusterVerifier _clusterVerifier;
   boolean _testSuccess = true;
   boolean _startListen = false;
 

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/integration/spectator/TestRoutingTableProvider.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/spectator/TestRoutingTableProvider.java b/helix-core/src/test/java/org/apache/helix/integration/spectator/TestRoutingTableProvider.java
index 0c1d0da..231f68d 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/spectator/TestRoutingTableProvider.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/spectator/TestRoutingTableProvider.java
@@ -21,7 +21,7 @@ import org.apache.helix.model.InstanceConfig;
 import org.apache.helix.spectator.RoutingTableProvider;
 import org.apache.helix.spectator.RoutingTableSnapshot;
 import org.apache.helix.tools.ClusterVerifiers.BestPossibleExternalViewVerifier;
-import org.apache.helix.tools.ClusterVerifiers.HelixClusterVerifier;
+import org.apache.helix.tools.ClusterVerifiers.ZkHelixClusterVerifier;
 import org.mockito.internal.util.collections.Sets;
 import org.testng.Assert;
 import org.testng.annotations.AfterClass;
@@ -44,7 +44,7 @@ public class TestRoutingTableProvider extends ZkTestBase {
   private List<MockParticipantManager> _participants = new ArrayList<MockParticipantManager>();
   private List<String> _instances = new ArrayList<>();
   private ClusterControllerManager _controller;
-  private HelixClusterVerifier _clusterVerifier;
+  private ZkHelixClusterVerifier _clusterVerifier;
   private RoutingTableProvider _routingTableProvider;
   private RoutingTableProvider _routingTableProvider2;
   private boolean _listenerTestResult = true;
@@ -112,7 +112,7 @@ public class TestRoutingTableProvider extends ZkTestBase {
     _routingTableProvider2 = new RoutingTableProvider(_spectator);
 
     _clusterVerifier = new BestPossibleExternalViewVerifier.Builder(CLUSTER_NAME).setZkClient(_gZkClient).build();
-    Assert.assertTrue(_clusterVerifier.verify());
+    Assert.assertTrue(_clusterVerifier.verifyByPolling());
   }
 
   @AfterClass
@@ -150,7 +150,7 @@ public class TestRoutingTableProvider extends ZkTestBase {
     // disable the master instance
     String prevMasterInstance = _instances.get(0);
     _gSetupTool.getClusterManagementTool().enableInstance(CLUSTER_NAME, prevMasterInstance, false);
-    Assert.assertTrue(_clusterVerifier.verify());
+    Assert.assertTrue(_clusterVerifier.verifyByPolling());
 
     validateRoutingTable(_routingTableProvider, Sets.newSet(_instances.get(1)),
         Sets.newSet(_instances.get(2)));
@@ -170,7 +170,7 @@ public class TestRoutingTableProvider extends ZkTestBase {
     // reenable the master instance to cause change
     String prevMasterInstance = _instances.get(0);
     _gSetupTool.getClusterManagementTool().enableInstance(CLUSTER_NAME, prevMasterInstance, true);
-    Assert.assertTrue(_clusterVerifier.verify());
+    Assert.assertTrue(_clusterVerifier.verifyByPolling());
     Assert.assertTrue(_listenerTestResult);
   }
 
@@ -180,7 +180,7 @@ public class TestRoutingTableProvider extends ZkTestBase {
     // shutdown second instance.
     _participants.get(1).syncStop();
 
-    Assert.assertTrue(_clusterVerifier.verify());
+    Assert.assertTrue(_clusterVerifier.verifyByPolling());
 
     Assert.assertEquals(_routingTableProvider.getLiveInstances().size(), _instances.size() - 1);
     Assert.assertEquals(_routingTableProvider.getInstanceConfigs().size(), _instances.size());

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/integration/spectator/TestRoutingTableProviderFromCurrentStates.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/spectator/TestRoutingTableProviderFromCurrentStates.java b/helix-core/src/test/java/org/apache/helix/integration/spectator/TestRoutingTableProviderFromCurrentStates.java
index 99e4ce6..e952e36 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/spectator/TestRoutingTableProviderFromCurrentStates.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/spectator/TestRoutingTableProviderFromCurrentStates.java
@@ -17,7 +17,7 @@ import org.apache.helix.model.IdealState;
 import org.apache.helix.model.InstanceConfig;
 import org.apache.helix.spectator.RoutingTableProvider;
 import org.apache.helix.tools.ClusterVerifiers.BestPossibleExternalViewVerifier;
-import org.apache.helix.tools.ClusterVerifiers.HelixClusterVerifier;
+import org.apache.helix.tools.ClusterVerifiers.ZkHelixClusterVerifier;
 import org.testng.Assert;
 import org.testng.annotations.AfterClass;
 import org.testng.annotations.BeforeClass;
@@ -97,9 +97,9 @@ public class TestRoutingTableProviderFromCurrentStates extends ZkTestBase {
       _gSetupTool.rebalanceStorageCluster(CLUSTER_NAME, db1, NUM_REPLICAS);
 
       Thread.sleep(200);
-      HelixClusterVerifier clusterVerifier =
+      ZkHelixClusterVerifier clusterVerifier =
           new BestPossibleExternalViewVerifier.Builder(CLUSTER_NAME).setZkAddr(ZK_ADDR).build();
-      Assert.assertTrue(clusterVerifier.verify());
+      Assert.assertTrue(clusterVerifier.verifyByPolling());
 
       IdealState idealState1 =
           _gSetupTool.getClusterManagementTool().getResourceIdealState(CLUSTER_NAME, db1);
@@ -111,7 +111,7 @@ public class TestRoutingTableProviderFromCurrentStates extends ZkTestBase {
       _gSetupTool.rebalanceStorageCluster(CLUSTER_NAME, db2, NUM_REPLICAS);
 
       Thread.sleep(200);
-      Assert.assertTrue(clusterVerifier.verify());
+      Assert.assertTrue(clusterVerifier.verifyByPolling());
 
       IdealState idealState2 =
           _gSetupTool.getClusterManagementTool().getResourceIdealState(CLUSTER_NAME, db2);
@@ -120,7 +120,7 @@ public class TestRoutingTableProviderFromCurrentStates extends ZkTestBase {
       // shutdown an instance
       _participants[0].syncStop();
       Thread.sleep(200);
-      Assert.assertTrue(clusterVerifier.verify());
+      Assert.assertTrue(clusterVerifier.verifyByPolling());
       validate(idealState1, routingTableEV, routingTableCurrentStates);
       validate(idealState2, routingTableEV, routingTableCurrentStates);
     } finally {

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/integration/spectator/TestRoutingTableProviderPeriodicRefresh.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/spectator/TestRoutingTableProviderPeriodicRefresh.java b/helix-core/src/test/java/org/apache/helix/integration/spectator/TestRoutingTableProviderPeriodicRefresh.java
index 0a922cf..223a4d6 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/spectator/TestRoutingTableProviderPeriodicRefresh.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/spectator/TestRoutingTableProviderPeriodicRefresh.java
@@ -20,7 +20,7 @@ import org.apache.helix.model.InstanceConfig;
 import org.apache.helix.model.LiveInstance;
 import org.apache.helix.spectator.RoutingTableProvider;
 import org.apache.helix.tools.ClusterVerifiers.BestPossibleExternalViewVerifier;
-import org.apache.helix.tools.ClusterVerifiers.HelixClusterVerifier;
+import org.apache.helix.tools.ClusterVerifiers.ZkHelixClusterVerifier;
 import org.slf4j.LoggerFactory;
 import org.testng.Assert;
 import org.testng.annotations.AfterClass;
@@ -46,7 +46,7 @@ public class TestRoutingTableProviderPeriodicRefresh extends ZkTestBase {
   private List<MockParticipantManager> _participants = new ArrayList<>();
   private List<String> _instances = new ArrayList<>();
   private ClusterControllerManager _controller;
-  private HelixClusterVerifier _clusterVerifier;
+  private ZkHelixClusterVerifier _clusterVerifier;
   private MockRoutingTableProvider _routingTableProvider;
   private MockRoutingTableProvider _routingTableProviderNoPeriodicRefresh;
   private MockRoutingTableProvider _routingTableProviderLongPeriodicRefresh;
@@ -114,7 +114,7 @@ public class TestRoutingTableProviderPeriodicRefresh extends ZkTestBase {
 
     _clusterVerifier =
         new BestPossibleExternalViewVerifier.Builder(CLUSTER_NAME).setZkClient(_gZkClient).build();
-    Assert.assertTrue(_clusterVerifier.verify());
+    Assert.assertTrue(_clusterVerifier.verifyByPolling());
 
   }
 

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/integration/spectator/TestRoutingTableSnapshot.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/spectator/TestRoutingTableSnapshot.java b/helix-core/src/test/java/org/apache/helix/integration/spectator/TestRoutingTableSnapshot.java
index b451e4a..b37d074 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/spectator/TestRoutingTableSnapshot.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/spectator/TestRoutingTableSnapshot.java
@@ -14,7 +14,7 @@ import org.apache.helix.model.InstanceConfig;
 import org.apache.helix.spectator.RoutingTableProvider;
 import org.apache.helix.spectator.RoutingTableSnapshot;
 import org.apache.helix.tools.ClusterVerifiers.BestPossibleExternalViewVerifier;
-import org.apache.helix.tools.ClusterVerifiers.HelixClusterVerifier;
+import org.apache.helix.tools.ClusterVerifiers.ZkHelixClusterVerifier;
 import org.testng.Assert;
 import org.testng.annotations.AfterClass;
 import org.testng.annotations.BeforeClass;
@@ -78,9 +78,9 @@ public class TestRoutingTableSnapshot extends ZkTestBase {
       _gSetupTool.rebalanceStorageCluster(CLUSTER_NAME, db1, NUM_REPLICAS);
 
       Thread.sleep(200);
-      HelixClusterVerifier clusterVerifier =
+      ZkHelixClusterVerifier clusterVerifier =
           new BestPossibleExternalViewVerifier.Builder(CLUSTER_NAME).setZkAddr(ZK_ADDR).build();
-      Assert.assertTrue(clusterVerifier.verify());
+      Assert.assertTrue(clusterVerifier.verifyByPolling());
 
       IdealState idealState1 =
           _gSetupTool.getClusterManagementTool().getResourceIdealState(CLUSTER_NAME, db1);
@@ -100,7 +100,7 @@ public class TestRoutingTableSnapshot extends ZkTestBase {
       // shutdown an instance
       _participants[0].syncStop();
       Thread.sleep(200);
-      Assert.assertTrue(clusterVerifier.verify());
+      Assert.assertTrue(clusterVerifier.verifyByPolling());
 
       // the original snapshot should not change
       Assert.assertEquals(routingTableSnapshot.getInstanceConfigs().size(), NUM_NODES);

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/integration/task/TaskTestBase.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/task/TaskTestBase.java b/helix-core/src/test/java/org/apache/helix/integration/task/TaskTestBase.java
index ab29607..fc6d81b 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/task/TaskTestBase.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/task/TaskTestBase.java
@@ -21,10 +21,7 @@ package org.apache.helix.integration.task;
 
 import org.apache.helix.integration.manager.ClusterControllerManager;
 import org.apache.helix.task.TaskSynchronizedTestBase;
-import org.apache.helix.tools.ClusterSetup;
-import org.apache.helix.tools.ClusterStateVerifier;
 import org.testng.Assert;
-import org.testng.annotations.AfterClass;
 import org.testng.annotations.BeforeClass;
 
 public class TaskTestBase extends TaskSynchronizedTestBase {
@@ -38,6 +35,6 @@ public class TaskTestBase extends TaskSynchronizedTestBase {
     _controller = new ClusterControllerManager(ZK_ADDR, CLUSTER_NAME, controllerName);
     _controller.syncStart();
 
-    Assert.assertTrue(_clusterVerifier.verify());
+    Assert.assertTrue(_clusterVerifier.verifyByPolling());
   }
 }

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/integration/task/TaskTestUtil.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/task/TaskTestUtil.java b/helix-core/src/test/java/org/apache/helix/integration/task/TaskTestUtil.java
index f4afbed..3918ab2 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/task/TaskTestUtil.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/task/TaskTestUtil.java
@@ -26,7 +26,6 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
 import java.util.concurrent.TimeUnit;
-
 import org.apache.helix.HelixDataAccessor;
 import org.apache.helix.HelixManager;
 import org.apache.helix.PropertyKey;

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/integration/task/TestDisableJobExternalView.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/task/TestDisableJobExternalView.java b/helix-core/src/test/java/org/apache/helix/integration/task/TestDisableJobExternalView.java
index 865f09b..db6e16f 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/task/TestDisableJobExternalView.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/task/TestDisableJobExternalView.java
@@ -19,10 +19,10 @@ package org.apache.helix.integration.task;
  * under the License.
  */
 
+import com.google.common.collect.Sets;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
-
 import org.apache.helix.ExternalViewChangeListener;
 import org.apache.helix.NotificationContext;
 import org.apache.helix.PropertyKey;
@@ -36,8 +36,6 @@ import org.slf4j.LoggerFactory;
 import org.testng.Assert;
 import org.testng.annotations.Test;
 
-import com.google.common.collect.Sets;
-
 public class TestDisableJobExternalView extends TaskTestBase {
   private static final Logger LOG = LoggerFactory.getLogger(TestDisableJobExternalView.class);
 

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/integration/task/TestFailTargetJobWhenResourceDisabled.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/task/TestFailTargetJobWhenResourceDisabled.java b/helix-core/src/test/java/org/apache/helix/integration/task/TestFailTargetJobWhenResourceDisabled.java
index 676c053..3d072ca 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/task/TestFailTargetJobWhenResourceDisabled.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/task/TestFailTargetJobWhenResourceDisabled.java
@@ -1,13 +1,10 @@
 package org.apache.helix.integration.task;
 
 import com.google.common.collect.ImmutableMap;
-import org.apache.helix.ConfigAccessor;
 import org.apache.helix.TestHelper;
-import org.apache.helix.model.IdealState;
 import org.apache.helix.task.JobConfig;
 import org.apache.helix.task.TaskState;
 import org.apache.helix.task.Workflow;
-import org.testng.Assert;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/integration/task/TestGenericJobs.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/task/TestGenericJobs.java b/helix-core/src/test/java/org/apache/helix/integration/task/TestGenericJobs.java
index 818c1a6..449dc32 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/task/TestGenericJobs.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/task/TestGenericJobs.java
@@ -21,7 +21,6 @@ package org.apache.helix.integration.task;
 
 import java.util.ArrayList;
 import java.util.List;
-
 import org.apache.helix.TestHelper;
 import org.apache.helix.task.JobConfig;
 import org.apache.helix.task.JobQueue;

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/integration/task/TestGenericTaskAssignmentCalculator.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/task/TestGenericTaskAssignmentCalculator.java b/helix-core/src/test/java/org/apache/helix/integration/task/TestGenericTaskAssignmentCalculator.java
index 5aa7dbe..d05c088 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/task/TestGenericTaskAssignmentCalculator.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/task/TestGenericTaskAssignmentCalculator.java
@@ -19,11 +19,12 @@ package org.apache.helix.integration.task;
  * under the License.
  */
 
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-
 import org.apache.helix.HelixManagerFactory;
 import org.apache.helix.InstanceType;
 import org.apache.helix.TestHelper;
@@ -39,7 +40,6 @@ import org.apache.helix.task.TaskFactory;
 import org.apache.helix.task.TaskResult;
 import org.apache.helix.task.TaskState;
 import org.apache.helix.task.TaskStateModelFactory;
-import org.apache.helix.task.TaskUtil;
 import org.apache.helix.task.Workflow;
 import org.apache.helix.tools.ClusterSetup;
 import org.testng.Assert;
@@ -47,9 +47,6 @@ import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 import org.testng.collections.Sets;
 
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-
 public class TestGenericTaskAssignmentCalculator extends TaskTestBase {
   private Set<String> _invokedClasses = Sets.newHashSet();
   private Map<String, Integer> _runCounts = Maps.newHashMap();

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/integration/task/TestIndependentTaskRebalancer.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/task/TestIndependentTaskRebalancer.java b/helix-core/src/test/java/org/apache/helix/integration/task/TestIndependentTaskRebalancer.java
index 5540bbf..7730eeb 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/task/TestIndependentTaskRebalancer.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/task/TestIndependentTaskRebalancer.java
@@ -19,12 +19,14 @@ package org.apache.helix.integration.task;
  * under the License.
  */
 
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-
 import org.apache.helix.HelixManagerFactory;
 import org.apache.helix.InstanceType;
 import org.apache.helix.TestHelper;
@@ -45,17 +47,12 @@ import org.apache.helix.task.TaskState;
 import org.apache.helix.task.TaskStateModelFactory;
 import org.apache.helix.task.Workflow;
 import org.apache.helix.task.WorkflowContext;
-import org.apache.helix.tools.ClusterSetup;
 import org.testng.Assert;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
 import org.testng.collections.Sets;
 
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-
 public class TestIndependentTaskRebalancer extends TaskTestBase {
   private Set<String> _invokedClasses = Sets.newHashSet();
   private Map<String, Integer> _runCounts = Maps.newHashMap();

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/integration/task/TestJobAndWorkflowType.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/task/TestJobAndWorkflowType.java b/helix-core/src/test/java/org/apache/helix/integration/task/TestJobAndWorkflowType.java
index 30215e3..86a588f 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/task/TestJobAndWorkflowType.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/task/TestJobAndWorkflowType.java
@@ -21,7 +21,6 @@ package org.apache.helix.integration.task;
 
 import java.util.HashMap;
 import java.util.Map;
-
 import org.apache.helix.TestHelper;
 import org.apache.helix.task.JobConfig;
 import org.apache.helix.task.TaskState;

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/integration/task/TestJobFailure.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/task/TestJobFailure.java b/helix-core/src/test/java/org/apache/helix/integration/task/TestJobFailure.java
index a2608c5..256fb31 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/task/TestJobFailure.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/task/TestJobFailure.java
@@ -38,7 +38,6 @@ import org.apache.helix.task.TaskState;
 import org.apache.helix.task.TaskSynchronizedTestBase;
 import org.apache.helix.task.TaskUtil;
 import org.apache.helix.task.Workflow;
-import org.apache.helix.tools.ClusterSetup;
 import org.apache.helix.util.TestInputLoader;
 import org.testng.Assert;
 import org.testng.annotations.BeforeClass;

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/integration/task/TestJobFailureDependence.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/task/TestJobFailureDependence.java b/helix-core/src/test/java/org/apache/helix/integration/task/TestJobFailureDependence.java
index 43d80fe..c1d49d6 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/task/TestJobFailureDependence.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/task/TestJobFailureDependence.java
@@ -19,9 +19,9 @@ package org.apache.helix.integration.task;
  * under the License.
  */
 
+import com.google.common.collect.Sets;
 import java.util.ArrayList;
 import java.util.List;
-
 import org.apache.helix.TestHelper;
 import org.apache.helix.task.JobConfig;
 import org.apache.helix.task.JobQueue;
@@ -32,8 +32,6 @@ import org.slf4j.LoggerFactory;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
-import com.google.common.collect.Sets;
-
 public class TestJobFailureDependence extends TaskTestBase {
   private static final Logger LOG = LoggerFactory.getLogger(TestJobFailureDependence.class);
 

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/integration/task/TestJobFailureHighThreshold.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/task/TestJobFailureHighThreshold.java b/helix-core/src/test/java/org/apache/helix/integration/task/TestJobFailureHighThreshold.java
index 062d277..852146b 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/task/TestJobFailureHighThreshold.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/task/TestJobFailureHighThreshold.java
@@ -33,9 +33,7 @@ import org.apache.helix.task.TaskState;
 import org.apache.helix.task.TaskSynchronizedTestBase;
 import org.apache.helix.task.TaskUtil;
 import org.apache.helix.task.Workflow;
-import org.apache.helix.tools.ClusterSetup;
 import org.apache.helix.tools.ClusterVerifiers.BestPossibleExternalViewVerifier;
-import org.apache.helix.tools.ClusterVerifiers.HelixClusterVerifier;
 import org.testng.Assert;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
@@ -61,9 +59,9 @@ public class TestJobFailureHighThreshold extends TaskSynchronizedTestBase {
     _controller = new ClusterControllerManager(ZK_ADDR, CLUSTER_NAME, CONTROLLER_PREFIX);
     _controller.syncStart();
 
-    HelixClusterVerifier clusterVerifier =
+    _clusterVerifier =
         new BestPossibleExternalViewVerifier.Builder(CLUSTER_NAME).setZkClient(_gZkClient).build();
-    Assert.assertTrue(clusterVerifier.verify(10000));
+    Assert.assertTrue(_clusterVerifier.verifyByPolling(10000, 100));
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/integration/task/TestJobFailureTaskNotStarted.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/task/TestJobFailureTaskNotStarted.java b/helix-core/src/test/java/org/apache/helix/integration/task/TestJobFailureTaskNotStarted.java
index ace98e0..83314b2 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/task/TestJobFailureTaskNotStarted.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/task/TestJobFailureTaskNotStarted.java
@@ -47,9 +47,7 @@ import org.apache.helix.task.TaskStateModelFactory;
 import org.apache.helix.task.TaskSynchronizedTestBase;
 import org.apache.helix.task.TaskUtil;
 import org.apache.helix.task.Workflow;
-import org.apache.helix.tools.ClusterSetup;
 import org.apache.helix.tools.ClusterVerifiers.BestPossibleExternalViewVerifier;
-import org.apache.helix.tools.ClusterVerifiers.HelixClusterVerifier;
 import org.testng.Assert;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
@@ -82,6 +80,8 @@ public class TestJobFailureTaskNotStarted extends TaskSynchronizedTestBase {
     ClusterConfig clusterConfig = _configAccessor.getClusterConfig(CLUSTER_NAME);
     clusterConfig.stateTransitionCancelEnabled(true);
     _configAccessor.setClusterConfig(CLUSTER_NAME, clusterConfig);
+
+    _clusterVerifier = new BestPossibleExternalViewVerifier.Builder(CLUSTER_NAME).setZkAddr(ZK_ADDR).build();
   }
 
   protected void startParticipantsWithStuckTaskStateModelFactory() {
@@ -187,8 +187,6 @@ public class TestJobFailureTaskNotStarted extends TaskSynchronizedTestBase {
 
     _gSetupTool.getClusterManagementTool().setResourceIdealState(CLUSTER_NAME, UNBALANCED_DB_NAME, idealState);
 
-    HelixClusterVerifier clusterVerifier =
-        new BestPossibleExternalViewVerifier.Builder(CLUSTER_NAME).setZkClient(_gZkClient).build();
-    Assert.assertTrue(clusterVerifier.verify(10000));
+    Assert.assertTrue(_clusterVerifier.verifyByPolling(10000, 100));
   }
 }

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/integration/task/TestJobQueueCleanUp.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/task/TestJobQueueCleanUp.java b/helix-core/src/test/java/org/apache/helix/integration/task/TestJobQueueCleanUp.java
index d2a495c..a385b53 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/task/TestJobQueueCleanUp.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/task/TestJobQueueCleanUp.java
@@ -19,6 +19,7 @@ package org.apache.helix.integration.task;
  * under the License.
  */
 
+import com.google.common.collect.ImmutableMap;
 import java.util.HashSet;
 import java.util.Set;
 import org.apache.helix.TestHelper;
@@ -33,8 +34,6 @@ import org.testng.Assert;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
-import com.google.common.collect.ImmutableMap;
-
 public class TestJobQueueCleanUp extends TaskTestBase {
   @BeforeClass
   public void beforeClass() throws Exception {

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/integration/task/TestJobTimeout.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/task/TestJobTimeout.java b/helix-core/src/test/java/org/apache/helix/integration/task/TestJobTimeout.java
index dffb613..9c63fc3 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/task/TestJobTimeout.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/task/TestJobTimeout.java
@@ -19,6 +19,8 @@ package org.apache.helix.integration.task;
  * under the License.
  */
 
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.Sets;
 import org.apache.helix.TestHelper;
 import org.apache.helix.integration.manager.ClusterControllerManager;
 import org.apache.helix.integration.manager.MockParticipantManager;
@@ -31,14 +33,10 @@ import org.apache.helix.task.TaskSynchronizedTestBase;
 import org.apache.helix.task.TaskUtil;
 import org.apache.helix.task.Workflow;
 import org.apache.helix.task.WorkflowConfig;
-import org.apache.helix.tools.ClusterSetup;
 import org.testng.Assert;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Sets;
-
 public final class TestJobTimeout extends TaskSynchronizedTestBase {
 
   @BeforeClass

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/integration/task/TestJobTimeoutTaskNotStarted.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/task/TestJobTimeoutTaskNotStarted.java b/helix-core/src/test/java/org/apache/helix/integration/task/TestJobTimeoutTaskNotStarted.java
index 32d5d52..1ea41ab 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/task/TestJobTimeoutTaskNotStarted.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/task/TestJobTimeoutTaskNotStarted.java
@@ -19,9 +19,9 @@ package org.apache.helix.integration.task;
  * under the License.
  */
 
+import com.google.common.collect.Sets;
 import java.util.HashMap;
 import java.util.Map;
-
 import org.apache.helix.ConfigAccessor;
 import org.apache.helix.integration.manager.ClusterControllerManager;
 import org.apache.helix.integration.manager.MockParticipantManager;
@@ -40,15 +40,11 @@ import org.apache.helix.task.TaskSynchronizedTestBase;
 import org.apache.helix.task.TaskUtil;
 import org.apache.helix.task.Workflow;
 import org.apache.helix.task.WorkflowConfig;
-import org.apache.helix.tools.ClusterSetup;
 import org.apache.helix.tools.ClusterVerifiers.BestPossibleExternalViewVerifier;
-import org.apache.helix.tools.ClusterVerifiers.HelixClusterVerifier;
 import org.testng.Assert;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
-import com.google.common.collect.Sets;
-
 
 public class TestJobTimeoutTaskNotStarted extends TaskSynchronizedTestBase {
 
@@ -74,9 +70,10 @@ public class TestJobTimeoutTaskNotStarted extends TaskSynchronizedTestBase {
     clusterConfig.setMaxConcurrentTaskPerInstance(_numParitions);
     _configAccessor.setClusterConfig(CLUSTER_NAME, clusterConfig);
 
-    HelixClusterVerifier clusterVerifier =
+    _clusterVerifier =
         new BestPossibleExternalViewVerifier.Builder(CLUSTER_NAME).setZkClient(_gZkClient).build();
-    Assert.assertTrue(clusterVerifier.verify(10000));
+
+    Assert.assertTrue(_clusterVerifier.verifyByPolling(10000, 100));
   }
 
   protected void startParticipantsWithStuckTaskStateModelFactory() {

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/integration/task/TestRebalanceRunningTask.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/task/TestRebalanceRunningTask.java b/helix-core/src/test/java/org/apache/helix/integration/task/TestRebalanceRunningTask.java
index f9fa2bc..8556805 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/task/TestRebalanceRunningTask.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/task/TestRebalanceRunningTask.java
@@ -32,9 +32,8 @@ import org.apache.helix.task.JobContext;
 import org.apache.helix.task.TaskSynchronizedTestBase;
 import org.apache.helix.task.TaskUtil;
 import org.apache.helix.task.Workflow;
-import org.apache.helix.tools.ClusterSetup;
 import org.apache.helix.tools.ClusterVerifiers.BestPossibleExternalViewVerifier;
-import org.apache.helix.tools.ClusterVerifiers.HelixClusterVerifier;
+import org.apache.helix.tools.ClusterVerifiers.ZkHelixClusterVerifier;
 import org.testng.Assert;
 import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeClass;
@@ -260,7 +259,7 @@ public final class TestRebalanceRunningTask extends TaskSynchronizedTestBase {
     Assert.assertTrue(checkTasksOnSameInstances());
     // Add a new instance, partition is rebalanced
     startParticipant(_initialNumNodes);
-    HelixClusterVerifier clusterVerifier =
+    ZkHelixClusterVerifier clusterVerifier =
         new BestPossibleExternalViewVerifier.Builder(CLUSTER_NAME).setZkClient(_gZkClient)
             .setResources(Sets.newHashSet(DATABASE)).build();
     Assert.assertTrue(clusterVerifier.verify(10*1000));
@@ -294,7 +293,7 @@ public final class TestRebalanceRunningTask extends TaskSynchronizedTestBase {
     Assert.assertTrue(checkTasksOnSameInstances());
     // Add a new instance, partition is rebalanced
     startParticipant(_initialNumNodes);
-    HelixClusterVerifier clusterVerifier =
+    ZkHelixClusterVerifier clusterVerifier =
         new BestPossibleExternalViewVerifier.Builder(CLUSTER_NAME).setZkClient(_gZkClient)
             .setResources(Sets.newHashSet(DATABASE)).build();
     Assert.assertTrue(clusterVerifier.verify(10*1000));

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/integration/task/TestRecurringJobQueue.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/task/TestRecurringJobQueue.java b/helix-core/src/test/java/org/apache/helix/integration/task/TestRecurringJobQueue.java
index 4569453..361a672 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/task/TestRecurringJobQueue.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/task/TestRecurringJobQueue.java
@@ -19,10 +19,11 @@ package org.apache.helix.integration.task;
  * under the License.
  */
 
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.Sets;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
-
 import org.apache.helix.HelixDataAccessor;
 import org.apache.helix.PropertyKey;
 import org.apache.helix.TestHelper;
@@ -38,9 +39,6 @@ import org.slf4j.LoggerFactory;
 import org.testng.Assert;
 import org.testng.annotations.Test;
 
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Sets;
-
 public class TestRecurringJobQueue extends TaskTestBase {
   private static final Logger LOG = LoggerFactory.getLogger(TestRecurringJobQueue.class);
 

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/integration/task/TestRetrieveWorkflows.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/task/TestRetrieveWorkflows.java b/helix-core/src/test/java/org/apache/helix/integration/task/TestRetrieveWorkflows.java
index 45fb278..4267ad2 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/task/TestRetrieveWorkflows.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/task/TestRetrieveWorkflows.java
@@ -18,6 +18,10 @@ package org.apache.helix.integration.task;
  * specific language governing permissions and limitations
  * under the License.
  */
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
 import org.apache.helix.TestHelper;
 import org.apache.helix.task.JobConfig;
 import org.apache.helix.task.JobContext;
@@ -28,10 +32,6 @@ import org.apache.helix.task.WorkflowContext;
 import org.testng.Assert;
 import org.testng.annotations.Test;
 
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
 public class TestRetrieveWorkflows extends TaskTestBase {
   @Test public void testGetAllWorkflows() throws Exception {
     List<Workflow> workflowList = new ArrayList<Workflow>();

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/integration/task/TestRunJobsWithMissingTarget.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/task/TestRunJobsWithMissingTarget.java b/helix-core/src/test/java/org/apache/helix/integration/task/TestRunJobsWithMissingTarget.java
index 23da9dc..d9a0f4f 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/task/TestRunJobsWithMissingTarget.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/task/TestRunJobsWithMissingTarget.java
@@ -19,9 +19,9 @@ package org.apache.helix.integration.task;
  * under the License.
  */
 
+import com.google.common.collect.Sets;
 import java.util.ArrayList;
 import java.util.List;
-
 import org.apache.helix.TestHelper;
 import org.apache.helix.task.JobConfig;
 import org.apache.helix.task.TaskState;
@@ -32,8 +32,6 @@ import org.slf4j.LoggerFactory;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
-import com.google.common.collect.Sets;
-
 public class TestRunJobsWithMissingTarget extends TaskTestBase {
   private static final Logger LOG = LoggerFactory.getLogger(TestRunJobsWithMissingTarget.class);
 

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/integration/task/TestTaskAssignment.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/task/TestTaskAssignment.java b/helix-core/src/test/java/org/apache/helix/integration/task/TestTaskAssignment.java
index 6045812..8082b36 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/task/TestTaskAssignment.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/task/TestTaskAssignment.java
@@ -21,12 +21,10 @@ package org.apache.helix.integration.task;
 
 import java.util.ArrayList;
 import java.util.List;
-
 import org.apache.helix.TestHelper;
 import org.apache.helix.task.JobConfig;
 import org.apache.helix.task.JobQueue;
 import org.apache.helix.task.TaskConfig;
-import org.apache.helix.task.TaskState;
 import org.apache.helix.task.TaskUtil;
 import org.apache.helix.task.Workflow;
 import org.testng.Assert;

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/integration/task/TestTaskConditionalRetry.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/task/TestTaskConditionalRetry.java b/helix-core/src/test/java/org/apache/helix/integration/task/TestTaskConditionalRetry.java
index b742eae..fa00164 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/task/TestTaskConditionalRetry.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/task/TestTaskConditionalRetry.java
@@ -18,9 +18,9 @@ package org.apache.helix.integration.task;
  * specific language governing permissions and limitations
  * under the License.
  */
+
 import java.util.ArrayList;
 import java.util.List;
-
 import org.apache.helix.TestHelper;
 import org.apache.helix.task.JobConfig;
 import org.apache.helix.task.JobContext;

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/integration/task/TestTaskErrorReporting.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/task/TestTaskErrorReporting.java b/helix-core/src/test/java/org/apache/helix/integration/task/TestTaskErrorReporting.java
index 80176da..5d92bb0 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/task/TestTaskErrorReporting.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/task/TestTaskErrorReporting.java
@@ -19,6 +19,8 @@ package org.apache.helix.integration.task;
  * under the License.
  */
 
+import java.util.ArrayList;
+import java.util.List;
 import org.apache.helix.TestHelper;
 import org.apache.helix.task.JobConfig;
 import org.apache.helix.task.JobContext;
@@ -31,9 +33,6 @@ import org.apache.helix.task.Workflow;
 import org.testng.Assert;
 import org.testng.annotations.Test;
 
-import java.util.ArrayList;
-import java.util.List;
-
 /**
  * Test Error reporting for failed tasks
  */

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/integration/task/TestTaskRebalancer.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/task/TestTaskRebalancer.java b/helix-core/src/test/java/org/apache/helix/integration/task/TestTaskRebalancer.java
index 17c0b1b..c7fd923 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/task/TestTaskRebalancer.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/task/TestTaskRebalancer.java
@@ -19,9 +19,12 @@ package org.apache.helix.integration.task;
  * under the License.
  */
 
+import com.google.common.base.Joiner;
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.Sets;
 import java.util.Map;
 import java.util.Set;
-
 import org.apache.helix.AccessOption;
 import org.apache.helix.HelixDataAccessor;
 import org.apache.helix.PropertyKey;
@@ -41,11 +44,6 @@ import org.apache.helix.task.WorkflowContext;
 import org.testng.Assert;
 import org.testng.annotations.Test;
 
-import com.google.common.base.Joiner;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Sets;
-
 public class TestTaskRebalancer extends TaskTestBase {
   @Test
   public void basic() throws Exception {

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/integration/task/TestTaskRebalancerFailover.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/task/TestTaskRebalancerFailover.java b/helix-core/src/test/java/org/apache/helix/integration/task/TestTaskRebalancerFailover.java
index db7d062..a3b2d53 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/task/TestTaskRebalancerFailover.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/task/TestTaskRebalancerFailover.java
@@ -19,8 +19,8 @@ package org.apache.helix.integration.task;
  * under the License.
  */
 
+import com.google.common.collect.Sets;
 import java.util.Set;
-
 import org.apache.helix.HelixDataAccessor;
 import org.apache.helix.PropertyKey;
 import org.apache.helix.TestHelper;
@@ -36,8 +36,6 @@ import org.slf4j.LoggerFactory;
 import org.testng.Assert;
 import org.testng.annotations.Test;
 
-import com.google.common.collect.Sets;
-
 public class TestTaskRebalancerFailover extends TaskTestBase {
   private static final Logger LOG = LoggerFactory.getLogger(TestTaskRebalancerFailover.class);
 

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/integration/task/TestTaskRebalancerParallel.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/task/TestTaskRebalancerParallel.java b/helix-core/src/test/java/org/apache/helix/integration/task/TestTaskRebalancerParallel.java
index 62aca00..9910798 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/task/TestTaskRebalancerParallel.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/task/TestTaskRebalancerParallel.java
@@ -22,9 +22,7 @@ package org.apache.helix.integration.task;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
-
 import org.apache.helix.TestHelper;
-import org.apache.helix.model.InstanceConfig;
 import org.apache.helix.task.JobConfig;
 import org.apache.helix.task.JobQueue;
 import org.apache.helix.task.TaskConfig;
@@ -90,7 +88,7 @@ public class TestTaskRebalancerParallel extends TaskTestBase {
     }
     ClusterLiveNodesVerifier verifier = new ClusterLiveNodesVerifier(_gZkClient, CLUSTER_NAME,
         Collections.singletonList(_participants[0].getInstanceName()));
-    Assert.assertTrue(verifier.verify());
+    Assert.assertTrue(verifier.verifyByPolling());
 
     String queueName = TestHelper.getTestMethodName();
 

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/integration/task/TestTaskRebalancerRetryLimit.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/task/TestTaskRebalancerRetryLimit.java b/helix-core/src/test/java/org/apache/helix/integration/task/TestTaskRebalancerRetryLimit.java
index 7f3d9d3..6ee502b 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/task/TestTaskRebalancerRetryLimit.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/task/TestTaskRebalancerRetryLimit.java
@@ -19,20 +19,17 @@ package org.apache.helix.integration.task;
  * under the License.
  */
 
+import com.google.common.collect.ImmutableMap;
 import org.apache.helix.TestHelper;
 import org.apache.helix.task.JobConfig;
 import org.apache.helix.task.JobContext;
-import org.apache.helix.task.Task;
 import org.apache.helix.task.TaskPartitionState;
-import org.apache.helix.task.TaskResult;
 import org.apache.helix.task.TaskState;
 import org.apache.helix.task.TaskUtil;
 import org.apache.helix.task.Workflow;
 import org.testng.Assert;
 import org.testng.annotations.Test;
 
-import com.google.common.collect.ImmutableMap;
-
 /**
  * Test task will be retried up to MaxAttemptsPerTask {@see HELIX-562}
  */

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/integration/task/TestTaskRebalancerStopResume.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/task/TestTaskRebalancerStopResume.java b/helix-core/src/test/java/org/apache/helix/integration/task/TestTaskRebalancerStopResume.java
index 2f5445b..5bd3392 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/task/TestTaskRebalancerStopResume.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/task/TestTaskRebalancerStopResume.java
@@ -19,6 +19,10 @@ package org.apache.helix.integration.task;
  * under the License.
  */
 
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Sets;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Date;
@@ -27,7 +31,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.TimeUnit;
-
 import org.apache.helix.HelixDataAccessor;
 import org.apache.helix.PropertyKey;
 import org.apache.helix.PropertyPathBuilder;
@@ -49,11 +52,6 @@ import org.slf4j.LoggerFactory;
 import org.testng.Assert;
 import org.testng.annotations.Test;
 
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Sets;
-
 public class TestTaskRebalancerStopResume extends TaskTestBase {
   private static final Logger LOG = LoggerFactory.getLogger(TestTaskRebalancerStopResume.class);
   private static final String JOB_RESOURCE = "SomeJob";

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/integration/task/TestTaskRetryDelay.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/task/TestTaskRetryDelay.java b/helix-core/src/test/java/org/apache/helix/integration/task/TestTaskRetryDelay.java
index 9c91457..df8beed 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/task/TestTaskRetryDelay.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/task/TestTaskRetryDelay.java
@@ -19,6 +19,7 @@ package org.apache.helix.integration.task;
  * under the License.
  */
 
+import com.google.common.collect.ImmutableMap;
 import org.apache.helix.TestHelper;
 import org.apache.helix.task.JobConfig;
 import org.apache.helix.task.TaskState;
@@ -27,8 +28,6 @@ import org.testng.Assert;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
-import com.google.common.collect.ImmutableMap;
-
 public class TestTaskRetryDelay extends TaskTestBase {
 
   @BeforeClass

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/integration/task/TestUnregisteredCommand.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/task/TestUnregisteredCommand.java b/helix-core/src/test/java/org/apache/helix/integration/task/TestUnregisteredCommand.java
index 6800159..95a9be4 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/task/TestUnregisteredCommand.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/task/TestUnregisteredCommand.java
@@ -19,8 +19,6 @@ package org.apache.helix.integration.task;
  * under the License.
  */
 
-import java.util.Map;
-
 import org.apache.helix.TestHelper;
 import org.apache.helix.task.JobConfig;
 import org.apache.helix.task.TaskPartitionState;

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/integration/task/TestUpdateWorkflow.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/task/TestUpdateWorkflow.java b/helix-core/src/test/java/org/apache/helix/integration/task/TestUpdateWorkflow.java
index ae87bb7..0078428 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/task/TestUpdateWorkflow.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/task/TestUpdateWorkflow.java
@@ -19,9 +19,9 @@ package org.apache.helix.integration.task;
  * under the License.
  */
 
+import com.google.common.collect.Sets;
 import java.util.Calendar;
 import java.util.concurrent.TimeUnit;
-
 import org.apache.helix.TestHelper;
 import org.apache.helix.task.JobConfig;
 import org.apache.helix.task.JobQueue;
@@ -35,8 +35,6 @@ import org.slf4j.LoggerFactory;
 import org.testng.Assert;
 import org.testng.annotations.Test;
 
-import com.google.common.collect.Sets;
-
 public class TestUpdateWorkflow extends TaskTestBase {
   private static final Logger LOG = LoggerFactory.getLogger(TestUpdateWorkflow.class);
 

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/integration/task/TestUserContentStore.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/task/TestUserContentStore.java b/helix-core/src/test/java/org/apache/helix/integration/task/TestUserContentStore.java
index b656cdc..dcfe553 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/task/TestUserContentStore.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/task/TestUserContentStore.java
@@ -19,10 +19,11 @@ package org.apache.helix.integration.task;
  * under the License.
  */
 
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-
 import org.apache.helix.HelixManagerFactory;
 import org.apache.helix.InstanceType;
 import org.apache.helix.TestHelper;
@@ -42,14 +43,10 @@ import org.apache.helix.task.TaskStateModelFactory;
 import org.apache.helix.task.TaskUtil;
 import org.apache.helix.task.UserContentStore;
 import org.apache.helix.task.Workflow;
-import org.apache.helix.tools.ClusterSetup;
 import org.testng.Assert;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-
 public class TestUserContentStore extends TaskTestBase {
 
   @BeforeClass

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/integration/task/TestWorkflowJobDependency.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/task/TestWorkflowJobDependency.java b/helix-core/src/test/java/org/apache/helix/integration/task/TestWorkflowJobDependency.java
index 97079bf..45558b6 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/task/TestWorkflowJobDependency.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/task/TestWorkflowJobDependency.java
@@ -19,6 +19,7 @@ package org.apache.helix.integration.task;
  * under the License.
  */
 
+import com.google.common.collect.Sets;
 import org.apache.helix.TestHelper;
 import org.apache.helix.task.JobConfig;
 import org.apache.helix.task.JobContext;
@@ -33,8 +34,6 @@ import org.testng.Assert;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
-import com.google.common.collect.Sets;
-
 public class TestWorkflowJobDependency extends TaskTestBase {
   private static final Logger LOG = LoggerFactory.getLogger(TestWorkflowJobDependency.class);
 

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/integration/task/WorkflowGenerator.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/task/WorkflowGenerator.java b/helix-core/src/test/java/org/apache/helix/integration/task/WorkflowGenerator.java
index 5db0431..2a12282 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/task/WorkflowGenerator.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/task/WorkflowGenerator.java
@@ -22,11 +22,8 @@ package org.apache.helix.integration.task;
 import java.util.Collections;
 import java.util.Map;
 import java.util.TreeMap;
-
 import org.apache.helix.task.JobConfig;
 import org.apache.helix.task.Workflow;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
  * Convenience class for generating various test workflows

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/manager/MockListener.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/manager/MockListener.java b/helix-core/src/test/java/org/apache/helix/manager/MockListener.java
index 376481e..5f272d9 100644
--- a/helix-core/src/test/java/org/apache/helix/manager/MockListener.java
+++ b/helix-core/src/test/java/org/apache/helix/manager/MockListener.java
@@ -20,7 +20,6 @@ package org.apache.helix.manager;
  */
 
 import java.util.List;
-
 import org.apache.helix.ConfigChangeListener;
 import org.apache.helix.ControllerChangeListener;
 import org.apache.helix.CurrentStateChangeListener;

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/manager/zk/TestAddBuiltInStateModelDef.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/manager/zk/TestAddBuiltInStateModelDef.java b/helix-core/src/test/java/org/apache/helix/manager/zk/TestAddBuiltInStateModelDef.java
index 395fd62..6c1b8f8 100644
--- a/helix-core/src/test/java/org/apache/helix/manager/zk/TestAddBuiltInStateModelDef.java
+++ b/helix-core/src/test/java/org/apache/helix/manager/zk/TestAddBuiltInStateModelDef.java
@@ -20,7 +20,6 @@ package org.apache.helix.manager.zk;
  */
 
 import java.util.Date;
-
 import org.apache.helix.BaseDataAccessor;
 import org.apache.helix.HelixAdmin;
 import org.apache.helix.PropertyKey;
@@ -77,6 +76,7 @@ public class TestAddBuiltInStateModelDef extends ZkUnitTestBase {
     }, 10 * 1000);
     Assert.assertTrue(ret);
     controller.syncStop();
+    admin.dropCluster(clusterName);
     System.out.println("END " + clusterName + " at " + new Date(System.currentTimeMillis()));
   }
 }

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/manager/zk/TestDefaultControllerMsgHandlerFactory.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/manager/zk/TestDefaultControllerMsgHandlerFactory.java b/helix-core/src/test/java/org/apache/helix/manager/zk/TestDefaultControllerMsgHandlerFactory.java
index ed4fd32..f7cddb2 100644
--- a/helix-core/src/test/java/org/apache/helix/manager/zk/TestDefaultControllerMsgHandlerFactory.java
+++ b/helix-core/src/test/java/org/apache/helix/manager/zk/TestDefaultControllerMsgHandlerFactory.java
@@ -22,10 +22,8 @@ package org.apache.helix.manager.zk;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;
-
 import org.apache.helix.HelixException;
 import org.apache.helix.NotificationContext;
-import org.apache.helix.manager.zk.DefaultControllerMessageHandlerFactory;
 import org.apache.helix.manager.zk.DefaultControllerMessageHandlerFactory.DefaultControllerMessageHandler;
 import org.apache.helix.messaging.handling.MessageHandler;
 import org.apache.helix.model.Message;

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/manager/zk/TestHandleNewSession.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/manager/zk/TestHandleNewSession.java b/helix-core/src/test/java/org/apache/helix/manager/zk/TestHandleNewSession.java
index d960315..3060c42 100644
--- a/helix-core/src/test/java/org/apache/helix/manager/zk/TestHandleNewSession.java
+++ b/helix-core/src/test/java/org/apache/helix/manager/zk/TestHandleNewSession.java
@@ -20,7 +20,6 @@ package org.apache.helix.manager.zk;
  */
 
 import java.util.Date;
-
 import org.apache.helix.TestHelper;
 import org.apache.helix.ZkTestHelper;
 import org.apache.helix.common.ZkTestBase;

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/manager/zk/TestWtCacheAsyncOpMultiThread.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/manager/zk/TestWtCacheAsyncOpMultiThread.java b/helix-core/src/test/java/org/apache/helix/manager/zk/TestWtCacheAsyncOpMultiThread.java
index a658b62..3f7488c 100644
--- a/helix-core/src/test/java/org/apache/helix/manager/zk/TestWtCacheAsyncOpMultiThread.java
+++ b/helix-core/src/test/java/org/apache/helix/manager/zk/TestWtCacheAsyncOpMultiThread.java
@@ -24,11 +24,9 @@ import java.util.Arrays;
 import java.util.Date;
 import java.util.List;
 import java.util.concurrent.Callable;
-
 import org.I0Itec.zkclient.DataUpdater;
 import org.apache.helix.AccessOption;
 import org.apache.helix.PropertyPathBuilder;
-import org.apache.helix.PropertyType;
 import org.apache.helix.TestHelper;
 import org.apache.helix.ZNRecord;
 import org.apache.helix.ZNRecordUpdater;

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/manager/zk/TestWtCacheAsyncOpSingleThread.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/manager/zk/TestWtCacheAsyncOpSingleThread.java b/helix-core/src/test/java/org/apache/helix/manager/zk/TestWtCacheAsyncOpSingleThread.java
index 4e52b81..e7ea457 100644
--- a/helix-core/src/test/java/org/apache/helix/manager/zk/TestWtCacheAsyncOpSingleThread.java
+++ b/helix-core/src/test/java/org/apache/helix/manager/zk/TestWtCacheAsyncOpSingleThread.java
@@ -23,11 +23,9 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Date;
 import java.util.List;
-
 import org.I0Itec.zkclient.DataUpdater;
 import org.apache.helix.AccessOption;
 import org.apache.helix.PropertyPathBuilder;
-import org.apache.helix.PropertyType;
 import org.apache.helix.TestHelper;
 import org.apache.helix.ZNRecord;
 import org.apache.helix.ZNRecordUpdater;

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/manager/zk/TestWtCacheSyncOpSingleThread.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/manager/zk/TestWtCacheSyncOpSingleThread.java b/helix-core/src/test/java/org/apache/helix/manager/zk/TestWtCacheSyncOpSingleThread.java
index 9549397..79a5cc6 100644
--- a/helix-core/src/test/java/org/apache/helix/manager/zk/TestWtCacheSyncOpSingleThread.java
+++ b/helix-core/src/test/java/org/apache/helix/manager/zk/TestWtCacheSyncOpSingleThread.java
@@ -22,10 +22,8 @@ package org.apache.helix.manager.zk;
 import java.util.Arrays;
 import java.util.Date;
 import java.util.List;
-
 import org.apache.helix.AccessOption;
 import org.apache.helix.PropertyPathBuilder;
-import org.apache.helix.PropertyType;
 import org.apache.helix.TestHelper;
 import org.apache.helix.ZNRecord;
 import org.apache.helix.ZNRecordUpdater;

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/manager/zk/TestZKLiveInstanceData.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/manager/zk/TestZKLiveInstanceData.java b/helix-core/src/test/java/org/apache/helix/manager/zk/TestZKLiveInstanceData.java
index 9546d59..2b75707 100644
--- a/helix-core/src/test/java/org/apache/helix/manager/zk/TestZKLiveInstanceData.java
+++ b/helix-core/src/test/java/org/apache/helix/manager/zk/TestZKLiveInstanceData.java
@@ -26,7 +26,6 @@ import java.util.TreeMap;
 import java.util.concurrent.BlockingQueue;
 import java.util.concurrent.LinkedBlockingQueue;
 import java.util.concurrent.TimeUnit;
-
 import org.apache.helix.HelixDataAccessor;
 import org.apache.helix.HelixManager;
 import org.apache.helix.HelixManagerFactory;
@@ -35,11 +34,10 @@ import org.apache.helix.LiveInstanceChangeListener;
 import org.apache.helix.NotificationContext;
 import org.apache.helix.PropertyKey;
 import org.apache.helix.ZkUnitTestBase;
-import org.apache.helix.manager.zk.ZNRecordSerializer;
-import org.apache.helix.manager.zk.ZkClient;
 import org.apache.helix.model.LiveInstance;
 import org.apache.helix.tools.ClusterSetup;
 import org.testng.Assert;
+import org.testng.annotations.AfterClass;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
@@ -108,24 +106,14 @@ public class TestZKLiveInstanceData extends ZkUnitTestBase {
 
   @BeforeClass()
   public void beforeClass() throws Exception {
-    ZkClient zkClient = null;
-    try {
-      zkClient = new ZkClient(ZK_ADDR);
-      zkClient.setZkSerializer(new ZNRecordSerializer());
-      if (zkClient.exists("/" + clusterName)) {
-        zkClient.deleteRecursively("/" + clusterName);
-      }
-    } finally {
-      if (zkClient != null) {
-        zkClient.close();
-      }
-    }
+    _gSetupTool.addCluster(clusterName, true);
+    _gSetupTool
+        .addInstancesToCluster(clusterName, new String[] { "localhost:54321", "localhost:54322" });
+  }
 
-    ClusterSetup.processCommandLineArgs(getArgs("-zkSvr", ZK_ADDR, "-addCluster", clusterName));
-    ClusterSetup.processCommandLineArgs(getArgs("-zkSvr", ZK_ADDR, "-addNode", clusterName,
-        "localhost:54321"));
-    ClusterSetup.processCommandLineArgs(getArgs("-zkSvr", ZK_ADDR, "-addNode", clusterName,
-        "localhost:54322"));
+  @AfterClass()
+  public void afterClass() throws Exception {
+    _gSetupTool.deleteCluster(clusterName);
   }
 
   private String[] getArgs(String... args) {

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/manager/zk/TestZKUtil.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/manager/zk/TestZKUtil.java b/helix-core/src/test/java/org/apache/helix/manager/zk/TestZKUtil.java
index c2373c0..2986748 100644
--- a/helix-core/src/test/java/org/apache/helix/manager/zk/TestZKUtil.java
+++ b/helix-core/src/test/java/org/apache/helix/manager/zk/TestZKUtil.java
@@ -19,7 +19,6 @@ package org.apache.helix.manager.zk;
  * under the License.
  */
 
-import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashMap;
@@ -40,19 +39,12 @@ public class TestZKUtil extends ZkUnitTestBase {
   private static Logger LOG = LoggerFactory.getLogger(TestZKUtil.class);
 
   String clusterName = CLUSTER_PREFIX + "_" + getShortClassName();
-  ZkClient _zkClient;
 
   @BeforeClass()
-  public void beforeClass() throws IOException, Exception {
-    _zkClient = new ZkClient(ZK_ADDR);
-    _zkClient.setZkSerializer(new ZNRecordSerializer());
-    if (_zkClient.exists("/" + clusterName)) {
-      _zkClient.deleteRecursively("/" + clusterName);
-    }
-
-    boolean result = ZKUtil.isClusterSetup(clusterName, _zkClient);
+  public void beforeClass() throws Exception {
+    boolean result = ZKUtil.isClusterSetup(clusterName, _gZkClient);
     AssertJUnit.assertFalse(result);
-    result = ZKUtil.isClusterSetup(null, _zkClient);
+    result = ZKUtil.isClusterSetup(null, _gZkClient);
     AssertJUnit.assertFalse(result);
 
     result = ZKUtil.isClusterSetup(null, null);
@@ -61,17 +53,17 @@ public class TestZKUtil extends ZkUnitTestBase {
     result = ZKUtil.isClusterSetup(clusterName, null);
     AssertJUnit.assertFalse(result);
 
-    TestHelper.setupEmptyCluster(_zkClient, clusterName);
+    TestHelper.setupEmptyCluster(_gZkClient, clusterName);
   }
 
   @AfterClass()
   public void afterClass() {
-    _zkClient.close();
+    deleteCluster(clusterName);
   }
 
   @Test()
   public void testIsClusterSetup() {
-    boolean result = ZKUtil.isClusterSetup(clusterName, _zkClient);
+    boolean result = ZKUtil.isClusterSetup(clusterName, _gZkClient);
     AssertJUnit.assertTrue(result);
   }
 
@@ -81,28 +73,28 @@ public class TestZKUtil extends ZkUnitTestBase {
     list.add(new ZNRecord("id1"));
     list.add(new ZNRecord("id2"));
     String path = PropertyPathBuilder.instanceConfig(clusterName);
-    ZKUtil.createChildren(_zkClient, path, list);
-    list = ZKUtil.getChildren(_zkClient, path);
+    ZKUtil.createChildren(_gZkClient, path, list);
+    list = ZKUtil.getChildren(_gZkClient, path);
     AssertJUnit.assertEquals(2, list.size());
 
-    ZKUtil.dropChildren(_zkClient, path, list);
-    ZKUtil.dropChildren(_zkClient, path, new ZNRecord("id1"));
-    list = ZKUtil.getChildren(_zkClient, path);
+    ZKUtil.dropChildren(_gZkClient, path, list);
+    ZKUtil.dropChildren(_gZkClient, path, new ZNRecord("id1"));
+    list = ZKUtil.getChildren(_gZkClient, path);
     AssertJUnit.assertEquals(0, list.size());
 
-    ZKUtil.dropChildren(_zkClient, path, (List<ZNRecord>) null);
+    ZKUtil.dropChildren(_gZkClient, path, (List<ZNRecord>) null);
   }
 
   @Test()
   public void testUpdateIfExists() {
     String path = PropertyPathBuilder.instanceConfig(clusterName, "id3");
     ZNRecord record = new ZNRecord("id4");
-    ZKUtil.updateIfExists(_zkClient, path, record, false);
-    AssertJUnit.assertFalse(_zkClient.exists(path));
-    _zkClient.createPersistent(path);
-    ZKUtil.updateIfExists(_zkClient, path, record, false);
-    AssertJUnit.assertTrue(_zkClient.exists(path));
-    record = _zkClient.<ZNRecord> readData(path);
+    ZKUtil.updateIfExists(_gZkClient, path, record, false);
+    AssertJUnit.assertFalse(_gZkClient.exists(path));
+    _gZkClient.createPersistent(path);
+    ZKUtil.updateIfExists(_gZkClient, path, record, false);
+    AssertJUnit.assertTrue(_gZkClient.exists(path));
+    record = _gZkClient.readData(path);
     AssertJUnit.assertEquals("id4", record.getId());
   }
 
@@ -111,16 +103,16 @@ public class TestZKUtil extends ZkUnitTestBase {
     String path = PropertyPathBuilder.instanceConfig(clusterName, "id5");
     ZNRecord record = new ZNRecord("id5");
     record.setSimpleField("key1", "value1");
-    _zkClient.createPersistent(path, record);
-    ZKUtil.subtract(_zkClient, path, record);
-    record = _zkClient.<ZNRecord> readData(path);
+    _gZkClient.createPersistent(path, record);
+    ZKUtil.subtract(_gZkClient, path, record);
+    record = _gZkClient.readData(path);
     AssertJUnit.assertNull(record.getSimpleField("key1"));
   }
 
   @Test()
   public void testNullChildren() {
     String path = PropertyPathBuilder.instanceConfig(clusterName, "id6");
-    ZKUtil.createChildren(_zkClient, path, (List<ZNRecord>) null);
+    ZKUtil.createChildren(_gZkClient, path, (List<ZNRecord>) null);
   }
 
   @Test()
@@ -129,28 +121,28 @@ public class TestZKUtil extends ZkUnitTestBase {
     ZNRecord record = new ZNRecord("id7");
     List<String> list = Arrays.asList("value1");
     record.setListField("list", list);
-    ZKUtil.createOrMerge(_zkClient, path, record, true, true);
-    record = _zkClient.readData(path);
+    ZKUtil.createOrMerge(_gZkClient, path, record, true, true);
+    record = _gZkClient.readData(path);
     AssertJUnit.assertEquals(list, record.getListField("list"));
 
     record = new ZNRecord("id7");
     List<String> list2 = Arrays.asList("value2");
     record.setListField("list", list2);
-    ZKUtil.createOrMerge(_zkClient, path, record, true, true);
-    record = _zkClient.readData(path);
+    ZKUtil.createOrMerge(_gZkClient, path, record, true, true);
+    record = _gZkClient.readData(path);
     AssertJUnit.assertEquals(Arrays.asList("value1", "value2"), record.getListField("list"));
 
     Map<String, String> map = new HashMap<String, String>() {{put("k1", "v1");}};
     record.setMapField("map", map);
-    ZKUtil.createOrMerge(_zkClient, path, record, true, true);
-    record = _zkClient.readData(path);
+    ZKUtil.createOrMerge(_gZkClient, path, record, true, true);
+    record = _gZkClient.readData(path);
     AssertJUnit.assertEquals(map, record.getMapField("map"));
 
     record = new ZNRecord("id7");
     Map<String, String> map2 = new HashMap<String, String>() {{put("k2", "v2");}};
     record.setMapField("map", map2);
-    ZKUtil.createOrMerge(_zkClient, path, record, true, true);
-    record = _zkClient.readData(path);
+    ZKUtil.createOrMerge(_gZkClient, path, record, true, true);
+    record = _gZkClient.readData(path);
     AssertJUnit.assertEquals(new HashMap<String, String>() {{
       put("k1", "v1");
       put("k2", "v2");
@@ -161,12 +153,12 @@ public class TestZKUtil extends ZkUnitTestBase {
   public void testCreateOrReplace() {
     String path = PropertyPathBuilder.instanceConfig(clusterName, "id8");
     ZNRecord record = new ZNRecord("id8");
-    ZKUtil.createOrReplace(_zkClient, path, record, true);
-    record = _zkClient.<ZNRecord> readData(path);
+    ZKUtil.createOrReplace(_gZkClient, path, record, true);
+    record = _gZkClient.readData(path);
     AssertJUnit.assertEquals("id8", record.getId());
     record = new ZNRecord("id9");
-    ZKUtil.createOrReplace(_zkClient, path, record, true);
-    record = _zkClient.<ZNRecord> readData(path);
+    ZKUtil.createOrReplace(_gZkClient, path, record, true);
+    record = _gZkClient.readData(path);
     AssertJUnit.assertEquals("id9", record.getId());
   }
 
@@ -174,36 +166,36 @@ public class TestZKUtil extends ZkUnitTestBase {
   public void testCreateOrUpdate() {
     String path = PropertyPathBuilder.instanceConfig(clusterName, "id7");
     ZNRecord record = new ZNRecord("id7");
-    ZKUtil.createOrMerge(_zkClient, path, record, true, true);
-    record = _zkClient.readData(path);
+    ZKUtil.createOrMerge(_gZkClient, path, record, true, true);
+    record = _gZkClient.readData(path);
     AssertJUnit.assertEquals("id7", record.getId());
 
     record = new ZNRecord("id7");
     List<String> list = Arrays.asList("value1", "value2");
     record.setListField("list", list);
-    ZKUtil.createOrUpdate(_zkClient, path, record, true, true);
-    record = _zkClient.readData(path);
+    ZKUtil.createOrUpdate(_gZkClient, path, record, true, true);
+    record = _gZkClient.readData(path);
     AssertJUnit.assertEquals(list, record.getListField("list"));
 
     record = new ZNRecord("id7");
     List<String> list2 = Arrays.asList("value3", "value4");
     record.setListField("list", list2);
-    ZKUtil.createOrUpdate(_zkClient, path, record, true, true);
-    record = _zkClient.readData(path);
+    ZKUtil.createOrUpdate(_gZkClient, path, record, true, true);
+    record = _gZkClient.readData(path);
     AssertJUnit.assertEquals(list2, record.getListField("list"));
 
 
     Map<String, String> map = new HashMap<String, String>() {{put("k1", "v1");}};
     record.setMapField("map", map);
-    ZKUtil.createOrUpdate(_zkClient, path, record, true, true);
-    record = _zkClient.readData(path);
+    ZKUtil.createOrUpdate(_gZkClient, path, record, true, true);
+    record = _gZkClient.readData(path);
     AssertJUnit.assertEquals(map, record.getMapField("map"));
 
     record = new ZNRecord("id7");
     Map<String, String> map2 = new HashMap<String, String>() {{put("k2", "v2");}};
     record.setMapField("map", map2);
-    ZKUtil.createOrUpdate(_zkClient, path, record, true, true);
-    record = _zkClient.readData(path);
+    ZKUtil.createOrUpdate(_gZkClient, path, record, true, true);
+    record = _gZkClient.readData(path);
     AssertJUnit.assertEquals(new HashMap<String, String>() {{
       put("k2", "v2");
     }}, record.getMapField("map"));

http://git-wip-us.apache.org/repos/asf/helix/blob/4609d944/helix-core/src/test/java/org/apache/helix/manager/zk/TestZNRecordSerializer.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/manager/zk/TestZNRecordSerializer.java b/helix-core/src/test/java/org/apache/helix/manager/zk/TestZNRecordSerializer.java
index 48ccdf8..05df1cd 100644
--- a/helix-core/src/test/java/org/apache/helix/manager/zk/TestZNRecordSerializer.java
+++ b/helix-core/src/test/java/org/apache/helix/manager/zk/TestZNRecordSerializer.java
@@ -1,19 +1,14 @@
 package org.apache.helix.manager.zk;
 
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Random;
-import java.util.UUID;
-
 import org.apache.helix.ZNRecord;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.testng.Assert;
 import org.testng.annotations.Test;
 
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableMap;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file