helix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kisho...@apache.org
Subject [3/6] [HELIX-4] Removing file based implementation
Date Fri, 09 Nov 2012 01:02:42 GMT
http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/99d394bf/helix-core/src/test/java/org/apache/helix/healthcheck/TestWildcardAlert.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/healthcheck/TestWildcardAlert.java b/helix-core/src/test/java/org/apache/helix/healthcheck/TestWildcardAlert.java
index a5483b1..c18769a 100644
--- a/helix-core/src/test/java/org/apache/helix/healthcheck/TestWildcardAlert.java
+++ b/helix-core/src/test/java/org/apache/helix/healthcheck/TestWildcardAlert.java
@@ -53,9 +53,9 @@ import org.apache.helix.manager.zk.ZKHelixDataAccessor;
 import org.apache.helix.manager.zk.ZNRecordSerializer;
 import org.apache.helix.manager.zk.ZkBaseDataAccessor;
 import org.apache.helix.manager.zk.ZkClient;
-import org.apache.helix.mock.storage.MockEspressoHealthReportProvider;
-import org.apache.helix.mock.storage.MockParticipant;
-import org.apache.helix.mock.storage.MockTransition;
+import org.apache.helix.mock.participant.MockEspressoHealthReportProvider;
+import org.apache.helix.mock.participant.MockParticipant;
+import org.apache.helix.mock.participant.MockTransition;
 import org.apache.helix.model.Message;
 import org.apache.helix.monitoring.mbeans.ClusterAlertMBeanCollection;
 import org.apache.helix.monitoring.mbeans.ClusterMBeanObserver;

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/99d394bf/helix-core/src/test/java/org/apache/helix/integration/FileCMTestBase.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/FileCMTestBase.java b/helix-core/src/test/java/org/apache/helix/integration/FileCMTestBase.java
deleted file mode 100644
index 5397a03..0000000
--- a/helix-core/src/test/java/org/apache/helix/integration/FileCMTestBase.java
+++ /dev/null
@@ -1,212 +0,0 @@
-package org.apache.helix.integration;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.Date;
-import java.util.List;
-
-import org.apache.helix.HelixAdmin;
-import org.apache.helix.HelixManager;
-import org.apache.helix.HelixManagerFactory;
-import org.apache.helix.InstanceType;
-import org.apache.helix.ZNRecord;
-import org.apache.helix.controller.GenericHelixController;
-import org.apache.helix.manager.file.FileHelixAdmin;
-import org.apache.helix.mock.storage.DummyProcess;
-import org.apache.helix.model.IdealState;
-import org.apache.helix.model.InstanceConfig;
-import org.apache.helix.model.StateModelDefinition;
-import org.apache.helix.model.InstanceConfig.InstanceConfigProperty;
-import org.apache.helix.store.PropertyJsonComparator;
-import org.apache.helix.store.PropertyJsonSerializer;
-import org.apache.helix.store.file.FilePropertyStore;
-import org.apache.helix.tools.ClusterStateVerifier;
-import org.apache.helix.tools.IdealStateCalculatorForStorageNode;
-import org.apache.helix.tools.StateModelConfigGenerator;
-import org.apache.log4j.Logger;
-import org.testng.Assert;
-import org.testng.annotations.AfterClass;
-import org.testng.annotations.BeforeClass;
-
-
-/**
- * Test base for dynamic file-based cluster manager
- * 
- * @author zzhang
- * 
- */
-
-public class FileCMTestBase
-{
-  private static Logger                       logger       =
-                                                               Logger.getLogger(FileCMTestBase.class);
-  protected final String                      CLUSTER_NAME = "CLUSTER_"
-                                                               + getShortClassName();
-  private static final String                 TEST_DB      = "TestDB";
-  protected static final String               STATE_MODEL  = "MasterSlave";
-  protected static final int                  NODE_NR      = 5;
-  protected static final int                  START_PORT   = 12918;
-  final String                                ROOT_PATH    = "/tmp/"
-                                                               + getShortClassName();
-
-  protected final FilePropertyStore<ZNRecord> _fileStore   =
-                                                               new FilePropertyStore<ZNRecord>(new PropertyJsonSerializer<ZNRecord>(ZNRecord.class),
-                                                                                               ROOT_PATH,
-                                                                                               new PropertyJsonComparator<ZNRecord>(ZNRecord.class));
-  protected HelixManager                      _manager;
-  protected HelixAdmin                        _mgmtTool;
-
-  @BeforeClass()
-  public void beforeClass() throws Exception
-  {
-    System.out.println("START BEFORECLASS FileCMTestBase at "
-        + new Date(System.currentTimeMillis()));
-
-    // setup test cluster
-    _mgmtTool = new FileHelixAdmin(_fileStore);
-    _mgmtTool.addCluster(CLUSTER_NAME, true);
-    
-    StateModelConfigGenerator generator = new StateModelConfigGenerator();
-    _mgmtTool.addStateModelDef(CLUSTER_NAME, "LeaderStandby",
-                     new StateModelDefinition(generator.generateConfigForLeaderStandby()));
-
-    _mgmtTool.addStateModelDef(CLUSTER_NAME,
-                               "OnlineOffline",
-                               new StateModelDefinition(generator.generateConfigForOnlineOffline()));
-    _mgmtTool.addResource(CLUSTER_NAME, TEST_DB, 10, STATE_MODEL);
-    for (int i = 0; i < NODE_NR; i++)
-    {
-      addNodeToCluster(CLUSTER_NAME, "localhost", START_PORT + i);
-    }
-    rebalanceStorageCluster(CLUSTER_NAME, TEST_DB, 3);
-
-    // start dummy storage nodes
-    for (int i = 0; i < NODE_NR; i++)
-    {
-      DummyProcess process =
-          new DummyProcess(null,
-                           CLUSTER_NAME,
-                           "localhost_" + (START_PORT + i),
-                           "dynamic-file",
-                           null,
-                           0,
-                           _fileStore);
-      try
-      {
-        process.start();
-      }
-      catch (Exception e)
-      {
-        logger.error("fail to start dummy participant using dynmaic file-based cluster-manager",
-                     e);
-      }
-
-      _manager =
-          HelixManagerFactory.getDynamicFileHelixManager(CLUSTER_NAME,
-                                                         "controller_0",
-                                                         InstanceType.CONTROLLER,
-                                                         _fileStore);
-
-    }
-
-    // start cluster manager controller
-    GenericHelixController controller = new GenericHelixController();
-    try
-    {
-      // manager.addConfigChangeListener(controller);
-      _manager.addLiveInstanceChangeListener(controller);
-      _manager.addIdealStateChangeListener(controller);
-      // manager.addExternalViewChangeListener(controller);
-      _manager.connect();
-    }
-    catch (Exception e)
-    {
-      logger.error("fail to start controller using dynamic file-based cluster-manager ",
-                   e);
-    }
-
-    boolean result =
-        ClusterStateVerifier.verifyByPolling(new ClusterStateVerifier.BestPossAndExtViewFileVerifier(ROOT_PATH,
-                                                                                                     CLUSTER_NAME));
-    Assert.assertTrue(result);
-
-    System.out.println("END BEFORECLASS FileCMTestBase at "
-        + new Date(System.currentTimeMillis()));
-  }
-
-  @AfterClass()
-  public void afterClass() throws Exception
-  {
-    logger.info("START afterClass FileCMTestBase shutting down file-based cluster managers at "
-        + new Date(System.currentTimeMillis()));
-
-    // Thread.sleep(3000);
-    // _store.stop();
-    _manager.disconnect();
-    _manager.disconnect(); // test if disconnect() can be called twice
-
-    logger.info("END afterClass FileCMTestBase at "
-        + new Date(System.currentTimeMillis()));
-
-  }
-
-  private String getShortClassName()
-  {
-    String className = this.getClass().getName();
-    return className.substring(className.lastIndexOf('.') + 1);
-  }
-
-  private void addNodeToCluster(String clusterName, String host, int port)
-  {
-    // TODO use ClusterSetup
-    String nodeId = host + "_" + port;
-    ZNRecord nodeConfig = new ZNRecord(nodeId);
-    nodeConfig.setSimpleField(InstanceConfigProperty.HELIX_HOST.toString(), host);
-    nodeConfig.setSimpleField(InstanceConfigProperty.HELIX_PORT.toString(),
-                              Integer.toString(port));
-    nodeConfig.setSimpleField(InstanceConfigProperty.HELIX_ENABLED.toString(),
-                              Boolean.toString(true));
-    _mgmtTool.addInstance(CLUSTER_NAME, new InstanceConfig(nodeConfig));
-  }
-
-  protected void rebalanceStorageCluster(String clusterName,
-                                         String resourceName,
-                                         int replica)
-  {
-    List<String> nodeNames = _mgmtTool.getInstancesInCluster(clusterName);
-
-    IdealState idealState = _mgmtTool.getResourceIdealState(clusterName, resourceName);
-    idealState.setReplicas(Integer.toString(replica));
-    int partitions = idealState.getNumPartitions();
-
-    ZNRecord newIdealState =
-        IdealStateCalculatorForStorageNode.calculateIdealState(nodeNames,
-                                                               partitions,
-                                                               replica - 1,
-                                                               resourceName,
-                                                               "MASTER",
-                                                               "SLAVE");
-
-    newIdealState.merge(idealState.getRecord());
-    _mgmtTool.setResourceIdealState(clusterName,
-                                    resourceName,
-                                    new IdealState(newIdealState));
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/99d394bf/helix-core/src/test/java/org/apache/helix/integration/TestAddNodeAfterControllerStart.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/TestAddNodeAfterControllerStart.java b/helix-core/src/test/java/org/apache/helix/integration/TestAddNodeAfterControllerStart.java
index 449f969..1913e57 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/TestAddNodeAfterControllerStart.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/TestAddNodeAfterControllerStart.java
@@ -30,7 +30,7 @@ import org.apache.helix.TestHelper;
 import org.apache.helix.controller.HelixControllerMain;
 import org.apache.helix.manager.zk.CallbackHandler;
 import org.apache.helix.manager.zk.ZKHelixManager;
-import org.apache.helix.mock.storage.MockParticipant;
+import org.apache.helix.mock.participant.MockParticipant;
 import org.apache.helix.tools.ClusterStateVerifier;
 import org.apache.log4j.Logger;
 import org.testng.Assert;

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/99d394bf/helix-core/src/test/java/org/apache/helix/integration/TestAddStateModelFactoryAfterConnect.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/TestAddStateModelFactoryAfterConnect.java b/helix-core/src/test/java/org/apache/helix/integration/TestAddStateModelFactoryAfterConnect.java
index 88bc929..7646622 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/TestAddStateModelFactoryAfterConnect.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/TestAddStateModelFactoryAfterConnect.java
@@ -27,8 +27,8 @@ import org.apache.helix.PropertyKey.Builder;
 import org.apache.helix.manager.zk.ZKHelixDataAccessor;
 import org.apache.helix.manager.zk.ZkBaseDataAccessor;
 import org.apache.helix.mock.controller.ClusterController;
-import org.apache.helix.mock.storage.MockParticipant;
-import org.apache.helix.mock.storage.MockParticipant.MockMSModelFactory;
+import org.apache.helix.mock.participant.MockParticipant;
+import org.apache.helix.mock.participant.MockParticipant.MockMSModelFactory;
 import org.apache.helix.model.ExternalView;
 import org.apache.helix.model.IdealState;
 import org.apache.helix.tools.ClusterSetup;

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/99d394bf/helix-core/src/test/java/org/apache/helix/integration/TestAutoIsWithEmptyMap.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/TestAutoIsWithEmptyMap.java b/helix-core/src/test/java/org/apache/helix/integration/TestAutoIsWithEmptyMap.java
index 6940982..2d3bf42 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/TestAutoIsWithEmptyMap.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/TestAutoIsWithEmptyMap.java
@@ -28,7 +28,7 @@ import org.apache.helix.PropertyType;
 import org.apache.helix.TestHelper;
 import org.apache.helix.ZNRecord;
 import org.apache.helix.controller.HelixControllerMain;
-import org.apache.helix.mock.storage.MockParticipant;
+import org.apache.helix.mock.participant.MockParticipant;
 import org.apache.helix.model.IdealState;
 import org.apache.helix.tools.ClusterStateVerifier;
 import org.apache.helix.tools.IdealStateCalculatorForStorageNode;

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/99d394bf/helix-core/src/test/java/org/apache/helix/integration/TestBucketizedResource.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/TestBucketizedResource.java b/helix-core/src/test/java/org/apache/helix/integration/TestBucketizedResource.java
index a5b9021..d103c1a 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/TestBucketizedResource.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/TestBucketizedResource.java
@@ -27,7 +27,7 @@ import org.apache.helix.PropertyKey.Builder;
 import org.apache.helix.controller.HelixControllerMain;
 import org.apache.helix.manager.zk.ZKHelixDataAccessor;
 import org.apache.helix.manager.zk.ZkBaseDataAccessor;
-import org.apache.helix.mock.storage.MockParticipant;
+import org.apache.helix.mock.participant.MockParticipant;
 import org.apache.helix.model.IdealState;
 import org.apache.helix.tools.ClusterStateVerifier;
 import org.apache.helix.tools.ClusterStateVerifier.BestPossAndExtViewZkVerifier;

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/99d394bf/helix-core/src/test/java/org/apache/helix/integration/TestCarryOverBadCurState.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/TestCarryOverBadCurState.java b/helix-core/src/test/java/org/apache/helix/integration/TestCarryOverBadCurState.java
index cf467c2..e04099d 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/TestCarryOverBadCurState.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/TestCarryOverBadCurState.java
@@ -26,7 +26,7 @@ import org.apache.helix.PropertyType;
 import org.apache.helix.TestHelper;
 import org.apache.helix.ZNRecord;
 import org.apache.helix.controller.HelixControllerMain;
-import org.apache.helix.mock.storage.MockParticipant;
+import org.apache.helix.mock.participant.MockParticipant;
 import org.apache.helix.tools.ClusterStateVerifier;
 import org.apache.helix.tools.ClusterStateVerifier.BestPossAndExtViewZkVerifier;
 import org.apache.helix.tools.ClusterStateVerifier.MasterNbInExtViewVerifier;

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/99d394bf/helix-core/src/test/java/org/apache/helix/integration/TestDisable.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/TestDisable.java b/helix-core/src/test/java/org/apache/helix/integration/TestDisable.java
index 0ce3667..f154007 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/TestDisable.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/TestDisable.java
@@ -30,7 +30,7 @@ import org.apache.helix.PropertyKey.Builder;
 import org.apache.helix.manager.zk.ZKHelixDataAccessor;
 import org.apache.helix.manager.zk.ZkBaseDataAccessor;
 import org.apache.helix.mock.controller.ClusterController;
-import org.apache.helix.mock.storage.MockParticipant;
+import org.apache.helix.mock.participant.MockParticipant;
 import org.apache.helix.model.IdealState;
 import org.apache.helix.model.IdealState.IdealStateModeProperty;
 import org.apache.helix.tools.ClusterSetup;

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/99d394bf/helix-core/src/test/java/org/apache/helix/integration/TestDistributedCMMain.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/TestDistributedCMMain.java b/helix-core/src/test/java/org/apache/helix/integration/TestDistributedCMMain.java
index 2671af0..967b094 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/TestDistributedCMMain.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/TestDistributedCMMain.java
@@ -28,7 +28,7 @@ import org.apache.helix.controller.HelixControllerMain;
 import org.apache.helix.manager.zk.ZKHelixDataAccessor;
 import org.apache.helix.manager.zk.ZkBaseDataAccessor;
 import org.apache.helix.mock.controller.ClusterController;
-import org.apache.helix.mock.storage.MockParticipant;
+import org.apache.helix.mock.participant.MockParticipant;
 import org.apache.helix.model.LiveInstance;
 import org.apache.helix.tools.ClusterSetup;
 import org.apache.helix.tools.ClusterStateVerifier;

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/99d394bf/helix-core/src/test/java/org/apache/helix/integration/TestDistributedClusterController.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/TestDistributedClusterController.java b/helix-core/src/test/java/org/apache/helix/integration/TestDistributedClusterController.java
index 83fa912..5764088 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/TestDistributedClusterController.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/TestDistributedClusterController.java
@@ -28,7 +28,7 @@ import org.apache.helix.controller.HelixControllerMain;
 import org.apache.helix.manager.zk.ZKHelixDataAccessor;
 import org.apache.helix.manager.zk.ZkBaseDataAccessor;
 import org.apache.helix.mock.controller.ClusterController;
-import org.apache.helix.mock.storage.MockParticipant;
+import org.apache.helix.mock.participant.MockParticipant;
 import org.apache.helix.model.LiveInstance;
 import org.apache.helix.tools.ClusterStateVerifier;
 import org.apache.helix.tools.ClusterStateVerifier.BestPossAndExtViewZkVerifier;

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/99d394bf/helix-core/src/test/java/org/apache/helix/integration/TestDrop.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/TestDrop.java b/helix-core/src/test/java/org/apache/helix/integration/TestDrop.java
index 9a302c3..eedf13b 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/TestDrop.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/TestDrop.java
@@ -30,8 +30,8 @@ import org.apache.helix.PropertyKey.Builder;
 import org.apache.helix.manager.zk.ZKHelixDataAccessor;
 import org.apache.helix.manager.zk.ZkBaseDataAccessor;
 import org.apache.helix.mock.controller.ClusterController;
-import org.apache.helix.mock.storage.MockParticipant;
-import org.apache.helix.mock.storage.MockParticipant.ErrTransition;
+import org.apache.helix.mock.participant.MockParticipant;
+import org.apache.helix.mock.participant.MockParticipant.ErrTransition;
 import org.apache.helix.model.ExternalView;
 import org.apache.helix.tools.ClusterSetup;
 import org.apache.helix.tools.ClusterStateVerifier;

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/99d394bf/helix-core/src/test/java/org/apache/helix/integration/TestDynamicFileClusterManager.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/TestDynamicFileClusterManager.java b/helix-core/src/test/java/org/apache/helix/integration/TestDynamicFileClusterManager.java
deleted file mode 100644
index 5daf5bb..0000000
--- a/helix-core/src/test/java/org/apache/helix/integration/TestDynamicFileClusterManager.java
+++ /dev/null
@@ -1,64 +0,0 @@
-package org.apache.helix.integration;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.Date;
-
-import org.apache.helix.TestHelper;
-import org.apache.helix.tools.ClusterStateVerifier;
-import org.apache.log4j.Logger;
-import org.testng.Assert;
-import org.testng.annotations.Test;
-
-
-public class TestDynamicFileClusterManager extends FileCMTestBase
-{
-  private static Logger LOG = Logger.getLogger(TestDynamicFileClusterManager.class);
-
-  @Test()
-  public void testDynamicFileClusterManager()
-  throws Exception
-  {
-    System.out.println("RUN testDynamicFileClusterManager() at " + new Date(System.currentTimeMillis()));
-
-    // add a new db
-    _mgmtTool.addResource(CLUSTER_NAME, "MyDB", 6, STATE_MODEL);
-    rebalanceStorageCluster(CLUSTER_NAME, "MyDB", 1);
-
-    boolean result = ClusterStateVerifier.verifyByPolling(
-        new ClusterStateVerifier.BestPossAndExtViewFileVerifier(ROOT_PATH, CLUSTER_NAME));
-    Assert.assertTrue(result);
-
-    // drop db
-    _mgmtTool.dropResource(CLUSTER_NAME, "MyDB");
-
-    TestHelper.verifyWithTimeout("verifyEmptyCurStateFile",
-                                 30 * 1000,
-                                 CLUSTER_NAME,
-                                 "MyDB",
-                                 TestHelper.<String>setOf("localhost_12918", "localhost_12919",
-                                                          "localhost_12920", "localhost_12921",
-                                                          "localhost_12922"),
-                                                          _fileStore);
-
-    System.out.println("STOP testDynamicFileClusterManager() at " + new Date(System.currentTimeMillis()));
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/99d394bf/helix-core/src/test/java/org/apache/helix/integration/TestEnablePartitionDuringDisable.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/TestEnablePartitionDuringDisable.java b/helix-core/src/test/java/org/apache/helix/integration/TestEnablePartitionDuringDisable.java
index 3a6a0cc..b46fd3f 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/TestEnablePartitionDuringDisable.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/TestEnablePartitionDuringDisable.java
@@ -25,8 +25,8 @@ import org.apache.helix.HelixManager;
 import org.apache.helix.NotificationContext;
 import org.apache.helix.TestHelper;
 import org.apache.helix.mock.controller.ClusterController;
-import org.apache.helix.mock.storage.MockParticipant;
-import org.apache.helix.mock.storage.MockTransition;
+import org.apache.helix.mock.participant.MockParticipant;
+import org.apache.helix.mock.participant.MockTransition;
 import org.apache.helix.model.Message;
 import org.apache.helix.tools.ClusterSetup;
 import org.apache.helix.tools.ClusterStateVerifier;

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/99d394bf/helix-core/src/test/java/org/apache/helix/integration/TestErrorPartition.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/TestErrorPartition.java b/helix-core/src/test/java/org/apache/helix/integration/TestErrorPartition.java
index b6f2e90..8d41f5f 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/TestErrorPartition.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/TestErrorPartition.java
@@ -28,8 +28,8 @@ import java.util.Set;
 import org.apache.helix.TestHelper;
 import org.apache.helix.controller.HelixControllerMain;
 import org.apache.helix.manager.zk.ZKHelixAdmin;
-import org.apache.helix.mock.storage.MockParticipant;
-import org.apache.helix.mock.storage.MockParticipant.ErrTransition;
+import org.apache.helix.mock.participant.MockParticipant;
+import org.apache.helix.mock.participant.MockParticipant.ErrTransition;
 import org.apache.helix.tools.ClusterStateVerifier;
 import org.testng.Assert;
 import org.testng.annotations.Test;

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/99d394bf/helix-core/src/test/java/org/apache/helix/integration/TestExternalViewUpdates.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/TestExternalViewUpdates.java b/helix-core/src/test/java/org/apache/helix/integration/TestExternalViewUpdates.java
index 71894bc..d3ffc1a 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/TestExternalViewUpdates.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/TestExternalViewUpdates.java
@@ -28,7 +28,7 @@ import org.apache.helix.ZNRecord;
 import org.apache.helix.PropertyKey.Builder;
 import org.apache.helix.controller.HelixControllerMain;
 import org.apache.helix.manager.zk.ZkBaseDataAccessor;
-import org.apache.helix.mock.storage.MockParticipant;
+import org.apache.helix.mock.participant.MockParticipant;
 import org.apache.helix.tools.ClusterStateVerifier;
 import org.apache.helix.tools.ClusterStateVerifier.BestPossAndExtViewZkVerifier;
 import org.apache.helix.tools.ClusterStateVerifier.MasterNbInExtViewVerifier;

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/99d394bf/helix-core/src/test/java/org/apache/helix/integration/TestFileBasedHelixManager.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/TestFileBasedHelixManager.java b/helix-core/src/test/java/org/apache/helix/integration/TestFileBasedHelixManager.java
deleted file mode 100644
index e8fccf0..0000000
--- a/helix-core/src/test/java/org/apache/helix/integration/TestFileBasedHelixManager.java
+++ /dev/null
@@ -1,71 +0,0 @@
-package org.apache.helix.integration;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-
-import org.apache.helix.ClusterView;
-import org.apache.helix.ZNRecord;
-import org.apache.helix.manager.file.StaticFileHelixManager;
-import org.apache.helix.tools.ClusterViewSerializer;
-import org.testng.AssertJUnit;
-import org.testng.annotations.Test;
-
-
-// TODO remove this test
-public class TestFileBasedHelixManager
-{
-  @Test ()
-  public void testFileBasedHelixManager() throws Exception
-  {
-    List<StaticFileHelixManager.DBParam> dbParams = new ArrayList<StaticFileHelixManager.DBParam>();
-    dbParams.add(new StaticFileHelixManager.DBParam("BizFollow", 1));
-    dbParams.add(new StaticFileHelixManager.DBParam("BizProfile", 1));
-    dbParams.add(new StaticFileHelixManager.DBParam("EspressoDB", 10));
-    dbParams.add(new StaticFileHelixManager.DBParam("MailboxDB", 128));
-    dbParams.add(new StaticFileHelixManager.DBParam("MyDB", 8));
-    dbParams.add(new StaticFileHelixManager.DBParam("schemata", 1));
-    String[] nodesInfo =
-    { "localhost:8900", "localhost:8901", "localhost:8902", "localhost:8903",
-        "localhost:8904" };
-    
-    String file = "/tmp/clusterView.json";
-    int replica = 0;
-    // ClusterViewSerializer serializer = new ClusterViewSerializer(file);
-    ClusterView view = StaticFileHelixManager.generateStaticConfigClusterView(nodesInfo, dbParams, replica);
-    view.setExternalView(new LinkedList<ZNRecord>());
-    ClusterViewSerializer.serialize(view, new File(file));
-    ClusterView restoredView = ClusterViewSerializer.deserialize(new File(file));
-    
-    verifyClusterViews(view, restoredView);
-  }
-  
-  public void verifyClusterViews(ClusterView view1, ClusterView view2)
-  {
-    AssertJUnit.assertEquals(view1.getPropertyLists().size(), view2.getPropertyLists().size());
-    AssertJUnit.assertEquals(view1.getExternalView().size(), view2.getExternalView().size());
-    AssertJUnit.assertEquals(view1.getMemberInstanceMap().size(), view2.getMemberInstanceMap().size());
-    AssertJUnit.assertEquals(view1.getInstances().size(), view2.getInstances().size());
-  }
-    
-}

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/99d394bf/helix-core/src/test/java/org/apache/helix/integration/TestGroupMessage.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/TestGroupMessage.java b/helix-core/src/test/java/org/apache/helix/integration/TestGroupMessage.java
index 40d0db7..83c0a78 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/TestGroupMessage.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/TestGroupMessage.java
@@ -29,7 +29,7 @@ import org.apache.helix.PropertyKey.Builder;
 import org.apache.helix.manager.zk.ZKHelixDataAccessor;
 import org.apache.helix.manager.zk.ZkBaseDataAccessor;
 import org.apache.helix.mock.controller.ClusterController;
-import org.apache.helix.mock.storage.MockParticipant;
+import org.apache.helix.mock.participant.MockParticipant;
 import org.apache.helix.model.IdealState;
 import org.apache.helix.tools.ClusterStateVerifier;
 import org.apache.helix.tools.ClusterStateVerifier.BestPossAndExtViewZkVerifier;

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/99d394bf/helix-core/src/test/java/org/apache/helix/integration/TestHelixCustomCodeRunner.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/TestHelixCustomCodeRunner.java b/helix-core/src/test/java/org/apache/helix/integration/TestHelixCustomCodeRunner.java
index df3a4e6..8546c67 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/TestHelixCustomCodeRunner.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/TestHelixCustomCodeRunner.java
@@ -32,8 +32,8 @@ import org.apache.helix.manager.zk.ZKHelixDataAccessor;
 import org.apache.helix.manager.zk.ZNRecordSerializer;
 import org.apache.helix.manager.zk.ZkBaseDataAccessor;
 import org.apache.helix.manager.zk.ZkClient;
-import org.apache.helix.mock.storage.MockJobIntf;
-import org.apache.helix.mock.storage.MockParticipant;
+import org.apache.helix.mock.participant.MockJobIntf;
+import org.apache.helix.mock.participant.MockParticipant;
 import org.apache.helix.model.LiveInstance;
 import org.apache.helix.participant.CustomCodeCallbackHandler;
 import org.apache.helix.participant.HelixCustomCodeRunner;

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/99d394bf/helix-core/src/test/java/org/apache/helix/integration/TestMessageThrottle.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/TestMessageThrottle.java b/helix-core/src/test/java/org/apache/helix/integration/TestMessageThrottle.java
index 71f0949..ea18fd0 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/TestMessageThrottle.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/TestMessageThrottle.java
@@ -36,7 +36,7 @@ import org.apache.helix.controller.HelixControllerMain;
 import org.apache.helix.manager.zk.ZKHelixAdmin;
 import org.apache.helix.manager.zk.ZKHelixDataAccessor;
 import org.apache.helix.manager.zk.ZkBaseDataAccessor;
-import org.apache.helix.mock.storage.MockParticipant;
+import org.apache.helix.mock.participant.MockParticipant;
 import org.apache.helix.model.ClusterConstraints;
 import org.apache.helix.model.Message;
 import org.apache.helix.model.ClusterConstraints.ConstraintType;

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/99d394bf/helix-core/src/test/java/org/apache/helix/integration/TestNonOfflineInitState.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/TestNonOfflineInitState.java b/helix-core/src/test/java/org/apache/helix/integration/TestNonOfflineInitState.java
index 95c79b7..c4d621d 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/TestNonOfflineInitState.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/TestNonOfflineInitState.java
@@ -24,8 +24,8 @@ import java.util.Date;
 import org.apache.helix.TestHelper;
 import org.apache.helix.controller.HelixControllerMain;
 import org.apache.helix.manager.zk.ZkClient;
-import org.apache.helix.mock.storage.MockParticipant;
-import org.apache.helix.mock.storage.MockParticipant.MockBootstrapModelFactory;
+import org.apache.helix.mock.participant.MockParticipant;
+import org.apache.helix.mock.participant.MockParticipant.MockBootstrapModelFactory;
 import org.apache.helix.participant.StateMachineEngine;
 import org.apache.helix.tools.ClusterSetup;
 import org.apache.helix.tools.ClusterStateVerifier;

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/99d394bf/helix-core/src/test/java/org/apache/helix/integration/TestNullReplica.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/TestNullReplica.java b/helix-core/src/test/java/org/apache/helix/integration/TestNullReplica.java
index 8c55a0a..0518627 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/TestNullReplica.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/TestNullReplica.java
@@ -26,7 +26,7 @@ import org.apache.helix.PropertyType;
 import org.apache.helix.TestHelper;
 import org.apache.helix.ZNRecord;
 import org.apache.helix.mock.controller.ClusterController;
-import org.apache.helix.mock.storage.MockParticipant;
+import org.apache.helix.mock.participant.MockParticipant;
 import org.apache.helix.model.IdealState;
 import org.apache.helix.tools.ClusterStateVerifier;
 import org.apache.helix.tools.ClusterStateVerifier.BestPossAndExtViewZkVerifier;

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/99d394bf/helix-core/src/test/java/org/apache/helix/integration/TestPauseSignal.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/TestPauseSignal.java b/helix-core/src/test/java/org/apache/helix/integration/TestPauseSignal.java
index 422060b..444399f 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/TestPauseSignal.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/TestPauseSignal.java
@@ -29,7 +29,7 @@ import org.apache.helix.manager.zk.ZNRecordSerializer;
 import org.apache.helix.manager.zk.ZkBaseDataAccessor;
 import org.apache.helix.manager.zk.ZkClient;
 import org.apache.helix.mock.controller.ClusterController;
-import org.apache.helix.mock.storage.MockParticipant;
+import org.apache.helix.mock.participant.MockParticipant;
 import org.apache.helix.model.PauseSignal;
 import org.apache.helix.tools.ClusterSetup;
 import org.apache.helix.tools.ClusterStateVerifier;

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/99d394bf/helix-core/src/test/java/org/apache/helix/integration/TestRenamePartition.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/TestRenamePartition.java b/helix-core/src/test/java/org/apache/helix/integration/TestRenamePartition.java
index 74349da..60c843b 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/TestRenamePartition.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/TestRenamePartition.java
@@ -30,7 +30,7 @@ import org.apache.helix.PropertyKey.Builder;
 import org.apache.helix.controller.HelixControllerMain;
 import org.apache.helix.manager.zk.ZKHelixDataAccessor;
 import org.apache.helix.manager.zk.ZkBaseDataAccessor;
-import org.apache.helix.mock.storage.MockParticipant;
+import org.apache.helix.mock.participant.MockParticipant;
 import org.apache.helix.model.IdealState;
 import org.apache.helix.tools.ClusterStateVerifier;
 import org.apache.helix.tools.IdealStateCalculatorForStorageNode;

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/99d394bf/helix-core/src/test/java/org/apache/helix/integration/TestResetInstance.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/TestResetInstance.java b/helix-core/src/test/java/org/apache/helix/integration/TestResetInstance.java
index 9a10100..337c5d8 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/TestResetInstance.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/TestResetInstance.java
@@ -26,8 +26,8 @@ import java.util.Set;
 
 import org.apache.helix.TestHelper;
 import org.apache.helix.mock.controller.ClusterController;
-import org.apache.helix.mock.storage.MockParticipant;
-import org.apache.helix.mock.storage.MockParticipant.ErrTransition;
+import org.apache.helix.mock.participant.MockParticipant;
+import org.apache.helix.mock.participant.MockParticipant.ErrTransition;
 import org.apache.helix.tools.ClusterSetup;
 import org.apache.helix.tools.ClusterStateVerifier;
 import org.testng.Assert;

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/99d394bf/helix-core/src/test/java/org/apache/helix/integration/TestResetPartitionState.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/TestResetPartitionState.java b/helix-core/src/test/java/org/apache/helix/integration/TestResetPartitionState.java
index d4bbfc6..380ca62 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/TestResetPartitionState.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/TestResetPartitionState.java
@@ -31,8 +31,8 @@ import org.apache.helix.PropertyKey.Builder;
 import org.apache.helix.manager.zk.ZKHelixDataAccessor;
 import org.apache.helix.manager.zk.ZkBaseDataAccessor;
 import org.apache.helix.mock.controller.ClusterController;
-import org.apache.helix.mock.storage.MockParticipant;
-import org.apache.helix.mock.storage.MockParticipant.ErrTransition;
+import org.apache.helix.mock.participant.MockParticipant;
+import org.apache.helix.mock.participant.MockParticipant.ErrTransition;
 import org.apache.helix.model.LiveInstance;
 import org.apache.helix.model.Message;
 import org.apache.helix.tools.ClusterSetup;

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/99d394bf/helix-core/src/test/java/org/apache/helix/integration/TestResetResource.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/TestResetResource.java b/helix-core/src/test/java/org/apache/helix/integration/TestResetResource.java
index 61a4135..db6d388 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/TestResetResource.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/TestResetResource.java
@@ -26,8 +26,8 @@ import java.util.Set;
 
 import org.apache.helix.TestHelper;
 import org.apache.helix.mock.controller.ClusterController;
-import org.apache.helix.mock.storage.MockParticipant;
-import org.apache.helix.mock.storage.MockParticipant.ErrTransition;
+import org.apache.helix.mock.participant.MockParticipant;
+import org.apache.helix.mock.participant.MockParticipant.ErrTransition;
 import org.apache.helix.tools.ClusterSetup;
 import org.apache.helix.tools.ClusterStateVerifier;
 import org.testng.Assert;

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/99d394bf/helix-core/src/test/java/org/apache/helix/integration/TestRestartParticipant.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/TestRestartParticipant.java b/helix-core/src/test/java/org/apache/helix/integration/TestRestartParticipant.java
index 0a6a2e6..feac915 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/TestRestartParticipant.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/TestRestartParticipant.java
@@ -25,8 +25,8 @@ import java.util.concurrent.atomic.AtomicReference;
 import org.apache.helix.NotificationContext;
 import org.apache.helix.TestHelper;
 import org.apache.helix.controller.HelixControllerMain;
-import org.apache.helix.mock.storage.MockParticipant;
-import org.apache.helix.mock.storage.MockTransition;
+import org.apache.helix.mock.participant.MockParticipant;
+import org.apache.helix.mock.participant.MockTransition;
 import org.apache.helix.model.Message;
 import org.apache.helix.tools.ClusterStateVerifier;
 import org.apache.helix.tools.ClusterStateVerifier.BestPossAndExtViewZkVerifier;

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/99d394bf/helix-core/src/test/java/org/apache/helix/integration/TestSchemataSM.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/TestSchemataSM.java b/helix-core/src/test/java/org/apache/helix/integration/TestSchemataSM.java
index 0f3a7f0..e599f82 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/TestSchemataSM.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/TestSchemataSM.java
@@ -23,7 +23,7 @@ import java.util.Date;
 
 import org.apache.helix.TestHelper;
 import org.apache.helix.controller.HelixControllerMain;
-import org.apache.helix.mock.storage.MockParticipant;
+import org.apache.helix.mock.participant.MockParticipant;
 import org.apache.helix.tools.ClusterStateVerifier;
 import org.apache.helix.tools.ClusterStateVerifier.BestPossAndExtViewZkVerifier;
 import org.testng.Assert;

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/99d394bf/helix-core/src/test/java/org/apache/helix/integration/TestSessionExpiryInTransition.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/TestSessionExpiryInTransition.java b/helix-core/src/test/java/org/apache/helix/integration/TestSessionExpiryInTransition.java
index 48a8e90..e405731 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/TestSessionExpiryInTransition.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/TestSessionExpiryInTransition.java
@@ -28,8 +28,8 @@ import org.apache.helix.TestHelper;
 import org.apache.helix.ZkTestHelper;
 import org.apache.helix.ZkTestHelper.TestZkHelixManager;
 import org.apache.helix.mock.controller.ClusterController;
-import org.apache.helix.mock.storage.MockParticipant;
-import org.apache.helix.mock.storage.MockTransition;
+import org.apache.helix.mock.participant.MockParticipant;
+import org.apache.helix.mock.participant.MockTransition;
 import org.apache.helix.model.Message;
 import org.apache.helix.tools.ClusterStateVerifier;
 import org.apache.helix.tools.ClusterStateVerifier.BestPossAndExtViewZkVerifier;

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/99d394bf/helix-core/src/test/java/org/apache/helix/integration/TestStandAloneCMSessionExpiry.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/TestStandAloneCMSessionExpiry.java b/helix-core/src/test/java/org/apache/helix/integration/TestStandAloneCMSessionExpiry.java
index f548e6b..a74d7ec 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/TestStandAloneCMSessionExpiry.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/TestStandAloneCMSessionExpiry.java
@@ -25,7 +25,7 @@ import org.apache.helix.InstanceType;
 import org.apache.helix.TestHelper;
 import org.apache.helix.ZkTestHelper;
 import org.apache.helix.ZkTestHelper.TestZkHelixManager;
-import org.apache.helix.mock.storage.MockParticipant;
+import org.apache.helix.mock.participant.MockParticipant;
 import org.apache.helix.tools.ClusterSetup;
 import org.apache.helix.tools.ClusterStateVerifier;
 import org.apache.log4j.Logger;

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/99d394bf/helix-core/src/test/java/org/apache/helix/integration/TestStateTransitionTimeout.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/TestStateTransitionTimeout.java b/helix-core/src/test/java/org/apache/helix/integration/TestStateTransitionTimeout.java
index 17e76f5..f014284 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/TestStateTransitionTimeout.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/TestStateTransitionTimeout.java
@@ -35,10 +35,10 @@ import org.apache.helix.controller.HelixControllerMain;
 import org.apache.helix.manager.zk.ZNRecordSerializer;
 import org.apache.helix.manager.zk.ZkClient;
 import org.apache.helix.messaging.handling.MessageHandler.ErrorCode;
-import org.apache.helix.mock.storage.MockJobIntf;
-import org.apache.helix.mock.storage.MockParticipant;
-import org.apache.helix.mock.storage.MockTransition;
-import org.apache.helix.mock.storage.MockParticipant.MockMSStateModel;
+import org.apache.helix.mock.participant.MockJobIntf;
+import org.apache.helix.mock.participant.MockParticipant;
+import org.apache.helix.mock.participant.MockTransition;
+import org.apache.helix.mock.participant.MockParticipant.MockMSStateModel;
 import org.apache.helix.model.ExternalView;
 import org.apache.helix.model.IdealState;
 import org.apache.helix.model.Message;

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/99d394bf/helix-core/src/test/java/org/apache/helix/manager/file/MockFileHelixManager.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/manager/file/MockFileHelixManager.java b/helix-core/src/test/java/org/apache/helix/manager/file/MockFileHelixManager.java
deleted file mode 100644
index 8d307d0..0000000
--- a/helix-core/src/test/java/org/apache/helix/manager/file/MockFileHelixManager.java
+++ /dev/null
@@ -1,279 +0,0 @@
-package org.apache.helix.manager.file;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.helix.ClusterMessagingService;
-import org.apache.helix.ConfigAccessor;
-import org.apache.helix.ConfigChangeListener;
-import org.apache.helix.ControllerChangeListener;
-import org.apache.helix.CurrentStateChangeListener;
-import org.apache.helix.DataAccessor;
-import org.apache.helix.ExternalViewChangeListener;
-import org.apache.helix.HealthStateChangeListener;
-import org.apache.helix.HelixAdmin;
-import org.apache.helix.HelixDataAccessor;
-import org.apache.helix.HelixManager;
-import org.apache.helix.IdealStateChangeListener;
-import org.apache.helix.InstanceType;
-import org.apache.helix.LiveInstanceChangeListener;
-import org.apache.helix.MessageListener;
-import org.apache.helix.PreConnectCallback;
-import org.apache.helix.ZNRecord;
-import org.apache.helix.healthcheck.ParticipantHealthReportCollector;
-import org.apache.helix.manager.file.FileHelixDataAccessor;
-import org.apache.helix.participant.StateMachineEngine;
-import org.apache.helix.store.PropertyStore;
-import org.apache.helix.store.file.FilePropertyStore;
-import org.apache.helix.store.zk.ZkHelixPropertyStore;
-
-public class MockFileHelixManager implements HelixManager
-{
-//  private final FileDataAccessor _accessor;
-  private final HelixDataAccessor _accessor;
-  private final String _instanceName;
-  private final String _clusterName;
-  private final InstanceType _type;
-
-  public MockFileHelixManager(String clusterName, String instanceName, InstanceType type,
-                              FilePropertyStore<ZNRecord> store)
-  {
-    _instanceName = instanceName;
-    _clusterName = clusterName;
-    _type = type;
-//    _accessor = new FileDataAccessor(store, clusterName);
-    _accessor = new FileHelixDataAccessor(store, clusterName);
-  }
-
-  @Override
-  public void connect() throws Exception
-  {
-    // TODO Auto-generated method stub
-
-  }
-
-  @Override
-  public boolean isConnected()
-  {
-    // TODO Auto-generated method stub
-    return false;
-  }
-
-  @Override
-  public void disconnect()
-  {
-    // TODO Auto-generated method stub
-
-  }
-
-  @Override
-  public void addIdealStateChangeListener(IdealStateChangeListener listener) throws Exception
-  {
-    // TODO Auto-generated method stub
-
-  }
-
-  @Override
-  public void addLiveInstanceChangeListener(LiveInstanceChangeListener listener) throws Exception
-  {
-    // TODO Auto-generated method stub
-
-  }
-
-  @Override
-  public void addConfigChangeListener(ConfigChangeListener listener) throws Exception
-  {
-    // TODO Auto-generated method stub
-
-  }
-
-  @Override
-  public void addMessageListener(MessageListener listener, String instanceName) throws Exception
-  {
-    // TODO Auto-generated method stub
-
-  }
-
-  @Override
-  public void addCurrentStateChangeListener(CurrentStateChangeListener listener,
-                                            String instanceName,
-                                            String sessionId) throws Exception
-  {
-    // TODO Auto-generated method stub
-
-  }
-
-  @Override
-  public void addExternalViewChangeListener(ExternalViewChangeListener listener) throws Exception
-  {
-    // TODO Auto-generated method stub
-
-  }
-
-  @Override
-  public boolean removeListener(Object listener)
-  {
-    // TODO Auto-generated method stub
-    return false;
-  }
-
-  @Override
-  public DataAccessor getDataAccessor()
-  {
-    return null;
-  }
-
-  @Override
-  public String getClusterName()
-  {
-    return _clusterName;
-  }
-
-  @Override
-  public String getInstanceName()
-  {
-    return _instanceName;
-  }
-
-  @Override
-  public String getSessionId()
-  {
-    // TODO Auto-generated method stub
-    return null;
-  }
-
-  @Override
-  public long getLastNotificationTime()
-  {
-    // TODO Auto-generated method stub
-    return 0;
-  }
-
-  @Override
-  public void addControllerListener(ControllerChangeListener listener)
-  {
-    // TODO Auto-generated method stub
-
-  }
-
-  @Override
-  public HelixAdmin getClusterManagmentTool()
-  {
-    // TODO Auto-generated method stub
-    return null;
-  }
-
-  @Override
-  public PropertyStore<ZNRecord> getPropertyStore()
-  {
-    // TODO Auto-generated method stub
-    return null;
-  }
-
-  @Override
-  public ClusterMessagingService getMessagingService()
-  {
-    // TODO Auto-generated method stub
-    return null;
-  }
-
-  @Override
-  public ParticipantHealthReportCollector getHealthReportCollector()
-  {
-    // TODO Auto-generated method stub
-    return null;
-  }
-
-  @Override
-  public InstanceType getInstanceType()
-  {
-    return _type;
-  }
-
-
-  @Override
-  public void addHealthStateChangeListener(HealthStateChangeListener listener,
-  		String instanceName) throws Exception {
-  	// TODO Auto-generated method stub
-
-  }
-
-  @Override
-  public String getVersion()
-  {
-    // TODO Auto-generated method stub
-    return null;
-  }
-
-  @Override
-  public StateMachineEngine getStateMachineEngine()
-  {
-    // TODO Auto-generated method stub
-    return null;
-  }
-
-  @Override
-  public boolean isLeader()
-  {
-    // TODO Auto-generated method stub
-    return false;
-  }
-
-  @Override
-  public ConfigAccessor getConfigAccessor()
-  {
-    // TODO Auto-generated method stub
-    return null;
-  }
-
-  @Override
-  public void startTimerTasks()
-  {
-    // TODO Auto-generated method stub
-
-  }
-
-  @Override
-  public void stopTimerTasks()
-  {
-    // TODO Auto-generated method stub
-
-  }
-
-  @Override
-  public HelixDataAccessor getHelixDataAccessor()
-  {
-    return _accessor;
-  }
-
-  @Override
-  public void addPreConnectCallback(PreConnectCallback callback)
-  {
-    // TODO Auto-generated method stub
-    
-  }
-
-  @Override
-  public ZkHelixPropertyStore<ZNRecord> getHelixPropertyStore()
-  {
-    // TODO Auto-generated method stub
-    return null;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/99d394bf/helix-core/src/test/java/org/apache/helix/manager/file/TestFileCallbackHandler.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/manager/file/TestFileCallbackHandler.java b/helix-core/src/test/java/org/apache/helix/manager/file/TestFileCallbackHandler.java
deleted file mode 100644
index 3886bf8..0000000
--- a/helix-core/src/test/java/org/apache/helix/manager/file/TestFileCallbackHandler.java
+++ /dev/null
@@ -1,108 +0,0 @@
-package org.apache.helix.manager.file;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.testng.annotations.Test;
-import org.testng.AssertJUnit;
-import org.apache.helix.InstanceType;
-import org.apache.helix.ZNRecord;
-import org.apache.helix.HelixConstants.ChangeType;
-import org.apache.helix.manager.MockListener;
-import org.apache.helix.manager.file.FileCallbackHandler;
-import org.apache.helix.store.PropertyJsonComparator;
-import org.apache.helix.store.PropertyJsonSerializer;
-import org.apache.helix.store.PropertyStoreException;
-import org.apache.helix.store.file.FilePropertyStore;
-import org.apache.zookeeper.Watcher.Event.EventType;
-import org.testng.Assert;
-import org.testng.annotations.Test;
-
-
-public class TestFileCallbackHandler
-{
-  @Test(groups = { "unitTest" })
-  public void testFileCallbackHandler()
-  {
-    final String clusterName = "TestFileCallbackHandler";
-    final String rootNamespace = "/tmp/" + clusterName;
-    final String instanceName = "controller_0";
-    MockListener listener = new MockListener();
-
-    PropertyJsonSerializer<ZNRecord> serializer =
-        new PropertyJsonSerializer<ZNRecord>(ZNRecord.class);
-    PropertyJsonComparator<ZNRecord> comparator =
-        new PropertyJsonComparator<ZNRecord>(ZNRecord.class);
-    FilePropertyStore<ZNRecord> store =
-        new FilePropertyStore<ZNRecord>(serializer, rootNamespace, comparator);
-    try
-    {
-      store.removeRootNamespace();
-    }
-    catch (PropertyStoreException e)
-    {
-      // TODO Auto-generated catch block
-      e.printStackTrace();
-    }
-
-    listener.reset();
-    MockFileHelixManager manager =
-        new MockFileHelixManager(clusterName, instanceName, InstanceType.CONTROLLER, store);
-    FileCallbackHandler handler =
-        new FileCallbackHandler(manager,
-                                   rootNamespace,
-                                   listener,
-                                   new EventType[] { EventType.NodeChildrenChanged,
-                                       EventType.NodeDeleted, EventType.NodeCreated },
-                                   ChangeType.CONFIG);
-    AssertJUnit.assertEquals(listener, handler.getListener());
-    AssertJUnit.assertEquals(rootNamespace, handler.getPath());
-    AssertJUnit.assertTrue(listener.isConfigChangeListenerInvoked);
-
-    handler =
-        new FileCallbackHandler(manager,
-                                   rootNamespace,
-                                   listener,
-                                   new EventType[] { EventType.NodeChildrenChanged,
-                                       EventType.NodeDeleted, EventType.NodeCreated },
-                                   ChangeType.EXTERNAL_VIEW);
-    AssertJUnit.assertTrue(listener.isExternalViewChangeListenerInvoked);
-
-    EventType[] eventTypes = new EventType[] { EventType.NodeChildrenChanged,
-        EventType.NodeDeleted, EventType.NodeCreated };
-    handler =
-        new FileCallbackHandler(manager,
-                                   rootNamespace,
-                                   listener,
-                                   eventTypes,
-                                   ChangeType.CONTROLLER);
-    AssertJUnit.assertEquals(handler.getEventTypes(), eventTypes);
-    AssertJUnit.assertTrue(listener.isControllerChangeListenerInvoked);
-    
-    listener.reset();
-    handler.reset();
-    AssertJUnit.assertTrue(listener.isControllerChangeListenerInvoked);
-
-    listener.reset();
-    handler.onPropertyChange(rootNamespace);
-    AssertJUnit.assertTrue(listener.isControllerChangeListenerInvoked);
-
-    store.stop();
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/99d394bf/helix-core/src/test/java/org/apache/helix/manager/file/TestFileDataAccessor.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/manager/file/TestFileDataAccessor.java b/helix-core/src/test/java/org/apache/helix/manager/file/TestFileDataAccessor.java
deleted file mode 100644
index a5e90d9..0000000
--- a/helix-core/src/test/java/org/apache/helix/manager/file/TestFileDataAccessor.java
+++ /dev/null
@@ -1,98 +0,0 @@
-package org.apache.helix.manager.file;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.helix.DataAccessor;
-import org.apache.helix.PropertyType;
-import org.apache.helix.ZNRecord;
-import org.apache.helix.ConfigScope.ConfigScopeProperty;
-import org.apache.helix.manager.file.FileDataAccessor;
-import org.apache.helix.model.InstanceConfig;
-import org.apache.helix.model.LiveInstance;
-import org.apache.helix.store.PropertyJsonComparator;
-import org.apache.helix.store.PropertyJsonSerializer;
-import org.apache.helix.store.PropertyStoreException;
-import org.apache.helix.store.file.FilePropertyStore;
-import org.testng.AssertJUnit;
-import org.testng.annotations.Test;
-
-
-public class TestFileDataAccessor
-{
-  @Test()
-  public void testFileDataAccessor()
-  {
-    final String clusterName = "TestFileDataAccessor";
-    String rootNamespace = "/tmp/" + clusterName;
-    PropertyJsonSerializer<ZNRecord> serializer = new PropertyJsonSerializer<ZNRecord>(
-        ZNRecord.class);
-    PropertyJsonComparator<ZNRecord> comparator = new PropertyJsonComparator<ZNRecord>(
-        ZNRecord.class);
-    FilePropertyStore<ZNRecord> store = new FilePropertyStore<ZNRecord>(serializer, rootNamespace,
-        comparator);
-    try
-    {
-      store.removeRootNamespace();
-    } catch (PropertyStoreException e)
-    {
-      // TODO Auto-generated catch block
-      e.printStackTrace();
-    }
-    DataAccessor accessor = new FileDataAccessor(store, clusterName);
-
-    InstanceConfig config = new InstanceConfig("id0");
-    accessor.setProperty(PropertyType.CONFIGS, config, ConfigScopeProperty.PARTICIPANT.toString(),
-        "key0");
-    config = accessor.getProperty(InstanceConfig.class, PropertyType.CONFIGS,
-        ConfigScopeProperty.PARTICIPANT.toString(), "key0");
-    AssertJUnit.assertEquals("id0", config.getId());
-
-    InstanceConfig newConfig = new InstanceConfig("id1");
-    accessor.updateProperty(PropertyType.CONFIGS, newConfig,
-        ConfigScopeProperty.PARTICIPANT.toString(),
-        "key0");
-    config = accessor.getProperty(InstanceConfig.class, PropertyType.CONFIGS,
-        ConfigScopeProperty.PARTICIPANT.toString(), "key0");
-    AssertJUnit.assertEquals("id1", config.getId());
-
-    accessor.removeProperty(PropertyType.CONFIGS, ConfigScopeProperty.PARTICIPANT.toString(),
-        "key0");
-    config = accessor.getProperty(InstanceConfig.class, PropertyType.CONFIGS,
-        ConfigScopeProperty.PARTICIPANT.toString(), "key0");
-    AssertJUnit.assertNull(config);
-
-    LiveInstance leader = new LiveInstance("id2");
-    accessor.updateProperty(PropertyType.LEADER, leader);
-    LiveInstance nullLeader = accessor.getProperty(LiveInstance.class, PropertyType.LEADER);
-    AssertJUnit.assertNull(nullLeader);
-
-    accessor.setProperty(PropertyType.LEADER, leader);
-    LiveInstance newLeader = new LiveInstance("id3");
-    accessor.updateProperty(PropertyType.LEADER, newLeader);
-    leader = accessor.getProperty(LiveInstance.class, PropertyType.LEADER);
-    AssertJUnit.assertEquals("id3", leader.getId());
-
-    // List<ZNRecord> childs = accessor.getChildValues(PropertyType.HISTORY);
-    // AssertJUnit.assertEquals(childs.size(), 0);
-
-    store.stop();
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/99d394bf/helix-core/src/test/java/org/apache/helix/manager/file/TestStaticFileCM.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/manager/file/TestStaticFileCM.java b/helix-core/src/test/java/org/apache/helix/manager/file/TestStaticFileCM.java
deleted file mode 100644
index 7d7e10e..0000000
--- a/helix-core/src/test/java/org/apache/helix/manager/file/TestStaticFileCM.java
+++ /dev/null
@@ -1,152 +0,0 @@
-package org.apache.helix.manager.file;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.helix.ClusterView;
-import org.apache.helix.InstanceType;
-import org.apache.helix.manager.MockListener;
-import org.apache.helix.manager.file.StaticFileHelixManager;
-import org.apache.helix.manager.file.StaticFileHelixManager.DBParam;
-import org.apache.helix.tools.ClusterViewSerializer;
-import org.testng.AssertJUnit;
-import org.testng.annotations.Test;
-
-
-public class TestStaticFileCM
-{
-  @Test()
-  public void testStaticFileCM()
-  {
-    final String clusterName = "TestSTaticFileCM";
-    final String controllerName = "controller_0";
-
-    ClusterView view;
-    String[] illegalNodesInfo = {"localhost_8900", "localhost_8901"};
-    List<DBParam> dbParams = new ArrayList<DBParam>();
-    dbParams.add(new DBParam("TestDB0", 10));
-    dbParams.add(new DBParam("TestDB1", 10));
-
-    boolean exceptionCaught = false;
-    try
-    {
-      view = StaticFileHelixManager.generateStaticConfigClusterView(illegalNodesInfo, dbParams, 3);
-    } catch (IllegalArgumentException e)
-    {
-      exceptionCaught = true;
-    }
-    AssertJUnit.assertTrue(exceptionCaught);
-    String[] nodesInfo = {"localhost:8900", "localhost:8901", "localhost:8902"};
-    view = StaticFileHelixManager.generateStaticConfigClusterView(nodesInfo, dbParams, 2);
-
-    String configFile = "/tmp/" + clusterName;
-    ClusterViewSerializer.serialize(view, new File(configFile));
-    ClusterView restoredView = ClusterViewSerializer.deserialize(new File(configFile));
-    // System.out.println(restoredView);
-    // byte[] bytes = ClusterViewSerializer.serialize(restoredView);
-    // System.out.println(new String(bytes));
-
-    StaticFileHelixManager.verifyFileBasedClusterStates("localhost_8900",
-                                       configFile, configFile);
-
-    StaticFileHelixManager controller = new StaticFileHelixManager(clusterName, controllerName,
-                                                     InstanceType.CONTROLLER, configFile);
-    controller.disconnect();
-    AssertJUnit.assertFalse(controller.isConnected());
-    controller.connect();
-    AssertJUnit.assertTrue(controller.isConnected());
-
-    String sessionId = controller.getSessionId();
-//    AssertJUnit.assertEquals(DynamicFileClusterManager._sessionId, sessionId);
-    AssertJUnit.assertEquals(clusterName, controller.getClusterName());
-    AssertJUnit.assertEquals(0, controller.getLastNotificationTime());
-    AssertJUnit.assertEquals(InstanceType.CONTROLLER, controller.getInstanceType());
-    AssertJUnit.assertNull(controller.getPropertyStore());
-    AssertJUnit.assertNull(controller.getHealthReportCollector());
-    AssertJUnit.assertEquals(controllerName, controller.getInstanceName());
-    AssertJUnit.assertNull(controller.getClusterManagmentTool());
-    AssertJUnit.assertNull(controller.getMessagingService());
-
-    MockListener controllerListener = new MockListener();
-    AssertJUnit.assertFalse(controller.removeListener(controllerListener));
-    controllerListener.reset();
-
-    controller.addIdealStateChangeListener(controllerListener);
-    AssertJUnit.assertTrue(controllerListener.isIdealStateChangeListenerInvoked);
-
-    controller.addMessageListener(controllerListener, "localhost_8900");
-    AssertJUnit.assertTrue(controllerListener.isMessageListenerInvoked);
-
-    exceptionCaught = false;
-    try
-    {
-      controller.addLiveInstanceChangeListener(controllerListener);
-    } catch (UnsupportedOperationException e)
-    {
-      exceptionCaught = true;
-    }
-    AssertJUnit.assertTrue(exceptionCaught);
-
-    exceptionCaught = false;
-    try
-    {
-      controller.addCurrentStateChangeListener(controllerListener, "localhost_8900", sessionId);
-    } catch (UnsupportedOperationException e)
-    {
-      exceptionCaught = true;
-    }
-    AssertJUnit.assertTrue(exceptionCaught);
-
-    exceptionCaught = false;
-    try
-    {
-      controller.addConfigChangeListener(controllerListener);
-    } catch (UnsupportedOperationException e)
-    {
-      exceptionCaught = true;
-    }
-    AssertJUnit.assertTrue(exceptionCaught);
-
-    exceptionCaught = false;
-    try
-    {
-      controller.addExternalViewChangeListener(controllerListener);
-    } catch (UnsupportedOperationException e)
-    {
-      exceptionCaught = true;
-    }
-    AssertJUnit.assertTrue(exceptionCaught);
-
-    exceptionCaught = false;
-    try
-    {
-      controller.addControllerListener(controllerListener);
-    } catch (UnsupportedOperationException e)
-    {
-      exceptionCaught = true;
-    }
-    AssertJUnit.assertTrue(exceptionCaught);
-
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/99d394bf/helix-core/src/test/java/org/apache/helix/manager/file/UnitTestDynFileClusterMgr.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/manager/file/UnitTestDynFileClusterMgr.java b/helix-core/src/test/java/org/apache/helix/manager/file/UnitTestDynFileClusterMgr.java
deleted file mode 100644
index 9bb7901..0000000
--- a/helix-core/src/test/java/org/apache/helix/manager/file/UnitTestDynFileClusterMgr.java
+++ /dev/null
@@ -1,286 +0,0 @@
-package org.apache.helix.manager.file;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.List;
-
-import org.apache.helix.ClusterMessagingService;
-import org.apache.helix.HelixAdmin;
-import org.apache.helix.HelixException;
-import org.apache.helix.InstanceType;
-import org.apache.helix.ZNRecord;
-import org.apache.helix.manager.MockListener;
-import org.apache.helix.manager.file.DynamicFileHelixManager;
-import org.apache.helix.manager.file.FileHelixAdmin;
-import org.apache.helix.mock.storage.DummyProcess;
-import org.apache.helix.model.IdealState;
-import org.apache.helix.model.InstanceConfig;
-import org.apache.helix.model.IdealState.IdealStateModeProperty;
-import org.apache.helix.store.PropertyJsonComparator;
-import org.apache.helix.store.PropertyJsonSerializer;
-import org.apache.helix.store.PropertyStore;
-import org.apache.helix.store.PropertyStoreException;
-import org.apache.helix.store.file.FilePropertyStore;
-import org.testng.Assert;
-import org.testng.AssertJUnit;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-
-public class UnitTestDynFileClusterMgr
-{
-  final String className = "UnitTestDynFileClusterMgr";
-  final String _rootNamespace = "/tmp/" + className;
-  final String instanceName = "localhost_12918";
-
-  FilePropertyStore<ZNRecord> _store;
-  HelixAdmin _mgmtTool;
-
-  @BeforeClass
-  public void beforeClass()
-  {
-    _store = new FilePropertyStore<ZNRecord>(new PropertyJsonSerializer<ZNRecord>(ZNRecord.class),
-        _rootNamespace, new PropertyJsonComparator<ZNRecord>(ZNRecord.class));
-    try
-    {
-      _store.removeRootNamespace();
-    } catch (PropertyStoreException e)
-    {
-      // TODO Auto-generated catch block
-      e.printStackTrace();
-    }
-
-    _mgmtTool = new FileHelixAdmin(_store);
-  }
-
-  @Test()
-  public void testBasic() throws PropertyStoreException
-  {
-    final String clusterName = className + "_basic";
-    String controllerName = "controller_0";
-    DynamicFileHelixManager controller = new DynamicFileHelixManager(clusterName,
-        controllerName, InstanceType.CONTROLLER, _store);
-
-    _mgmtTool.addCluster(clusterName, true);
-    _mgmtTool.addInstance(clusterName, new InstanceConfig(instanceName));
-
-    DynamicFileHelixManager participant = new DynamicFileHelixManager(clusterName,
-        instanceName, InstanceType.PARTICIPANT, _store);
-
-    AssertJUnit.assertEquals(instanceName, participant.getInstanceName());
-
-    controller.disconnect();
-    AssertJUnit.assertFalse(controller.isConnected());
-    controller.connect();
-    AssertJUnit.assertTrue(controller.isConnected());
-
-    String sessionId = controller.getSessionId();
-    // AssertJUnit.assertEquals(DynamicFileClusterManager._sessionId,
-    // sessionId);
-    AssertJUnit.assertEquals(clusterName, controller.getClusterName());
-    AssertJUnit.assertEquals(0, controller.getLastNotificationTime());
-    AssertJUnit.assertEquals(InstanceType.CONTROLLER, controller.getInstanceType());
-
-    // AssertJUnit.assertNull(controller.getPropertyStore());
-    PropertyStore<ZNRecord> propertyStore = controller.getPropertyStore();
-    AssertJUnit.assertNotNull(propertyStore);
-    propertyStore.setProperty("testKey", new ZNRecord("testValue"));
-    ZNRecord record = propertyStore.getProperty("testKey");
-    Assert.assertEquals(record.getId(), "testValue");
-
-    AssertJUnit.assertNull(controller.getHealthReportCollector());
-
-    MockListener controllerListener = new MockListener();
-    controllerListener.reset();
-
-    controller.addIdealStateChangeListener(controllerListener);
-    AssertJUnit.assertTrue(controllerListener.isIdealStateChangeListenerInvoked);
-
-    controller.addLiveInstanceChangeListener(controllerListener);
-    AssertJUnit.assertTrue(controllerListener.isLiveInstanceChangeListenerInvoked);
-
-    controller.addCurrentStateChangeListener(controllerListener, controllerName, sessionId);
-    AssertJUnit.assertTrue(controllerListener.isCurrentStateChangeListenerInvoked);
-
-    boolean exceptionCaught = false;
-    try
-    {
-      controller.addConfigChangeListener(controllerListener);
-    } catch (UnsupportedOperationException e)
-    {
-      exceptionCaught = true;
-    }
-    AssertJUnit.assertTrue(exceptionCaught);
-
-    exceptionCaught = false;
-    try
-    {
-      controller.addExternalViewChangeListener(controllerListener);
-    } catch (UnsupportedOperationException e)
-    {
-      exceptionCaught = true;
-    }
-    AssertJUnit.assertTrue(exceptionCaught);
-
-    exceptionCaught = false;
-    try
-    {
-      controller.addControllerListener(controllerListener);
-    } catch (UnsupportedOperationException e)
-    {
-      exceptionCaught = true;
-    }
-    AssertJUnit.assertTrue(exceptionCaught);
-
-    AssertJUnit.assertFalse(controller.removeListener(controllerListener));
-
-    exceptionCaught = false;
-    try
-    {
-      controller.addIdealStateChangeListener(null);
-    } catch (HelixException e)
-    {
-      exceptionCaught = true;
-    }
-    AssertJUnit.assertTrue(exceptionCaught);
-
-    // test message service
-    ClusterMessagingService msgService = controller.getMessagingService();
-
-    // test file management tool
-    HelixAdmin tool = controller.getClusterManagmentTool();
-
-    exceptionCaught = false;
-    try
-    {
-      tool.getClusters();
-    } catch (UnsupportedOperationException e)
-    {
-      exceptionCaught = true;
-    }
-    AssertJUnit.assertTrue(exceptionCaught);
-
-    exceptionCaught = false;
-    try
-    {
-      tool.getResourcesInCluster(clusterName);
-    } catch (UnsupportedOperationException e)
-    {
-      exceptionCaught = true;
-    }
-    AssertJUnit.assertTrue(exceptionCaught);
-
-    exceptionCaught = false;
-    try
-    {
-      tool.addResource(clusterName, "resource", 10, "MasterSlave",
-          IdealStateModeProperty.AUTO.toString());
-    } catch (UnsupportedOperationException e)
-    {
-      exceptionCaught = true;
-    }
-    AssertJUnit.assertTrue(exceptionCaught);
-
-    exceptionCaught = false;
-    try
-    {
-      tool.getStateModelDefs(clusterName);
-    } catch (UnsupportedOperationException e)
-    {
-      exceptionCaught = true;
-    }
-    AssertJUnit.assertTrue(exceptionCaught);
-
-    exceptionCaught = false;
-    try
-    {
-      tool.getInstanceConfig(clusterName, instanceName);
-    } catch (UnsupportedOperationException e)
-    {
-      exceptionCaught = true;
-    }
-    AssertJUnit.assertTrue(exceptionCaught);
-
-    exceptionCaught = false;
-    try
-    {
-      tool.getStateModelDef(clusterName, "MasterSlave");
-    } catch (UnsupportedOperationException e)
-    {
-      exceptionCaught = true;
-    }
-    AssertJUnit.assertTrue(exceptionCaught);
-
-    exceptionCaught = false;
-    try
-    {
-      tool.getResourceExternalView(clusterName, "resource");
-    } catch (UnsupportedOperationException e)
-    {
-      exceptionCaught = true;
-    }
-    AssertJUnit.assertTrue(exceptionCaught);
-
-    exceptionCaught = false;
-    try
-    {
-      tool.enableInstance(clusterName, "resource", false);
-    } catch (UnsupportedOperationException e)
-    {
-      exceptionCaught = true;
-    }
-    AssertJUnit.assertTrue(exceptionCaught);
-
-    tool.addCluster(clusterName, true);
-    tool.addResource(clusterName, "resource", 10, "MasterSlave");
-    InstanceConfig config = new InstanceConfig("nodeConfig");
-    tool.addInstance(clusterName, config);
-    List<String> instances = tool.getInstancesInCluster(clusterName);
-    AssertJUnit.assertEquals(1, instances.size());
-    tool.dropInstance(clusterName, config);
-
-    IdealState idealState = new IdealState("idealState");
-    tool.setResourceIdealState(clusterName, "resource", idealState);
-    idealState = tool.getResourceIdealState(clusterName, "resource");
-    AssertJUnit.assertEquals(idealState.getId(), "idealState");
-
-    tool.dropResource(clusterName, "resource");
-    _store.stop();
-  }
-
-  @Test
-  public void testStartInstanceBeforeAdd()
-  {
-    final String clusterName = className + "_startInsB4Add";
-    _mgmtTool.addCluster(clusterName, true);
-
-    try
-    {
-      new DummyProcess(null, clusterName, instanceName, "dynamic-file", null, 0, _store).start();
-      Assert.fail("Should fail since instance is not configured");
-    } catch (HelixException e)
-    {
-      // OK
-    } catch (Exception e)
-    {
-      Assert.fail("Should not fail on exceptions other than ClusterManagerException");
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/99d394bf/helix-core/src/test/java/org/apache/helix/mock/consumer/ConsumerAdapter.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/mock/consumer/ConsumerAdapter.java b/helix-core/src/test/java/org/apache/helix/mock/consumer/ConsumerAdapter.java
deleted file mode 100644
index 49e1942..0000000
--- a/helix-core/src/test/java/org/apache/helix/mock/consumer/ConsumerAdapter.java
+++ /dev/null
@@ -1,138 +0,0 @@
-package org.apache.helix.mock.consumer;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.apache.helix.DataAccessor;
-import org.apache.helix.ExternalViewChangeListener;
-import org.apache.helix.HelixManager;
-import org.apache.helix.HelixManagerFactory;
-import org.apache.helix.InstanceType;
-import org.apache.helix.NotificationContext;
-import org.apache.helix.ZNRecord;
-import org.apache.helix.model.ExternalView;
-import org.apache.log4j.Logger;
-
-
-public class ConsumerAdapter implements ExternalViewChangeListener
-{
-
-  HelixManager relayHelixManager;
-  DataAccessor relayClusterClient;
-  private final ConcurrentHashMap<String, RelayConsumer> relayConsumers;
-  private final ConcurrentHashMap<String, RelayConfig> relayConfigs;
-  private static Logger logger = Logger.getLogger(ConsumerAdapter.class);
-
-  public ConsumerAdapter(String instanceName, String zkServer,
-      String clusterName) throws Exception
-  {
-    relayConsumers = new ConcurrentHashMap<String, RelayConsumer>();
-    relayConfigs = new ConcurrentHashMap<String, RelayConfig>();
-
-//    relayClusterManager = ClusterManagerFactory.getZKBasedManagerForSpectator(
-//        clusterName, zkServer);
-    relayHelixManager = HelixManagerFactory.getZKHelixManager(clusterName,
-                                                                    null,
-                                                                    InstanceType.SPECTATOR,
-                                                                    zkServer);
-
-    relayHelixManager.connect();
-    relayHelixManager.addExternalViewChangeListener(this);
-
-  }
-
-  private RelayConfig getRelayConfig(ZNRecord externalView, String partition)
-  {
-    LinkedHashMap<String, String> relayList = (LinkedHashMap<String, String>) externalView
-        .getMapField(partition);
-
-    if (relayList == null)
-      return null;
-
-    return new RelayConfig(relayList);
-
-  }
-
-  @Override
-  public void onExternalViewChange(List<ExternalView> externalViewList,
-      NotificationContext changeContext)
-  {
-    logger.info("onExternalViewChange invoked");
-
-    for (ExternalView subview : externalViewList)
-    {
-      Map<String, Map<String, String>> partitions = subview.getRecord().getMapFields();
-
-      for (Entry<String, Map<String, String>> partitionConsumer : partitions
-          .entrySet())
-      {
-        String partition = partitionConsumer.getKey();
-        Map<String, String> relayList = partitionConsumer.getValue();
-        RelayConfig relayConfig = new RelayConfig(relayList);
-        relayConfigs.put(partition, relayConfig);
-        RelayConsumer consumer = relayConsumers.get(partition);
-        if (consumer != null)
-        {
-          consumer.setConfig(relayConfig);
-        }
-      }
-    }
-  }
-
-  public void start()
-  {
-    // TODO Auto-generated method stub
-
-  }
-
-  public RelayConsumer getNewRelayConsumer(String dbName, String partition)
-      throws Exception
-  {
-    RelayConsumer consumer = new RelayConsumer(null, partition);
-
-    if (relayConsumers.putIfAbsent(partition, consumer) != null)
-    {
-      throw new Exception("Existing consumer");
-    }
-    logger.info("created new consumer for partition" + partition);
-
-    RelayConfig relayConfig = relayConfigs.get(partition);
-    if (relayConfig != null)
-    {
-      consumer.setConfig(relayConfig);
-    }
-
-    return consumer;
-  }
-
-  public void removeConsumer(String partition) throws Exception
-  {
-    if (relayConsumers.remove(partition) == null)
-    {
-      throw new Exception("Non Existing consumer for partition " + partition);
-    }
-    logger.info("Removed consumer for partition " + partition);
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/99d394bf/helix-core/src/test/java/org/apache/helix/mock/consumer/RelayConfig.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/mock/consumer/RelayConfig.java b/helix-core/src/test/java/org/apache/helix/mock/consumer/RelayConfig.java
deleted file mode 100644
index e9a5f22..0000000
--- a/helix-core/src/test/java/org/apache/helix/mock/consumer/RelayConfig.java
+++ /dev/null
@@ -1,85 +0,0 @@
-package org.apache.helix.mock.consumer;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.util.ArrayList;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.TreeMap;
-import java.util.Map.Entry;
-
-public class RelayConfig
-{
-  String partitionId;
-  private ArrayList<String> masterRelays;
-  private ArrayList<String> slaveRelays;
-
-  public RelayConfig(Map<String, String> relayList)
-  {
-
-    masterRelays = new ArrayList<String>();
-    slaveRelays = new ArrayList<String>();
-
-    for (Entry<String, String> entry : relayList.entrySet())
-    {
-      String relayInstance = entry.getKey();
-      String relayState = entry.getValue();
-
-      if (relayState.equals("MASTER"))
-      {
-        masterRelays.add(relayInstance);
-      } else if (relayState.equals("SLAVE"))
-      {
-        slaveRelays.add(relayInstance);
-      }
-    }
-  }
-
-  public String getClusterName()
-  {
-    // TODO Auto-generated method stub
-    return null;
-  }
-
-  public String getzkServer()
-  {
-    // TODO Auto-generated method stub
-    return null;
-  }
-
-  public String getMaster()
-  {
-    if (masterRelays.isEmpty())
-      return null;
-
-    return masterRelays.get(0);
-  }
-
-  public List<String> getRelays()
-  {
-    List<String> relays = new ArrayList<String>();
-    relays.addAll(masterRelays);
-    relays.addAll(slaveRelays);
-
-    return relays;
-  }
-
-}


Mime
View raw message