helix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s..@apache.org
Subject [1/2] git commit: [HELIX-7]Fix test failure
Date Wed, 03 Apr 2013 02:04:33 GMT
Updated Branches:
  refs/heads/master 24fd28c9c -> 58944dc4b


[HELIX-7]Fix test failure

Project: http://git-wip-us.apache.org/repos/asf/incubator-helix/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-helix/commit/fe6c846b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-helix/tree/fe6c846b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-helix/diff/fe6c846b

Branch: refs/heads/master
Commit: fe6c846b1a138a719484b344c9bf5d7310301df4
Parents: 24fd28c
Author: slu2011 <lushi04@gmail.com>
Authored: Tue Apr 2 18:53:43 2013 -0700
Committer: slu2011 <lushi04@gmail.com>
Committed: Tue Apr 2 18:53:43 2013 -0700

----------------------------------------------------------------------
 .../apache/helix/manager/zk/TestZkHelixAdmin.java  |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/fe6c846b/helix-core/src/test/java/org/apache/helix/manager/zk/TestZkHelixAdmin.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/manager/zk/TestZkHelixAdmin.java b/helix-core/src/test/java/org/apache/helix/manager/zk/TestZkHelixAdmin.java
index fd3c495..7e4af44 100644
--- a/helix-core/src/test/java/org/apache/helix/manager/zk/TestZkHelixAdmin.java
+++ b/helix-core/src/test/java/org/apache/helix/manager/zk/TestZkHelixAdmin.java
@@ -130,9 +130,18 @@ public class TestZkHelixAdmin extends ZkUnitTestBase
     {
       // OK
     }
+    catch(IllegalArgumentException ex)
+    {
+      // OK
+    }
+    
+    tool.addStateModelDef(clusterName,
+        "MasterSlave",
+        new StateModelDefinition(StateModelConfigGenerator.generateConfigForMasterSlave()));
+    stateModelRecord = StateModelConfigGenerator.generateConfigForMasterSlave();
     try
     {
-      tool.addStateModelDef(clusterName, "id1", new StateModelDefinition(
+      tool.addStateModelDef(clusterName, stateModelRecord.getId(), new StateModelDefinition(
           stateModelRecord));
       Assert.fail("should fail if add an already-existing state model");
     } catch (HelixException e)
@@ -140,7 +149,7 @@ public class TestZkHelixAdmin extends ZkUnitTestBase
       // OK
     }
     list = tool.getStateModelDefs(clusterName);
-    AssertJUnit.assertEquals(list.size(), 0);
+    AssertJUnit.assertEquals(list.size(), 1);
 
     try
     {


Mime
View raw message