helix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ka...@apache.org
Subject [1/2] git commit: [HELIX-273] Rebalancer interface should remain unchanged in 0.6.2, add test assert, rb=14915
Date Fri, 25 Oct 2013 01:35:29 GMT
Updated Branches:
  refs/heads/helix-0.6.2-release 002acfd64 -> 5c7721970


[HELIX-273] Rebalancer interface should remain unchanged in 0.6.2, add test assert, rb=14915


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

Branch: refs/heads/helix-0.6.2-release
Commit: 74483638eb3257d8104a401b8521dc7e40a5c56d
Parents: 610b28b
Author: Kanak Biscuitwala <kanak@apache.org>
Authored: Thu Oct 24 15:49:59 2013 -0700
Committer: Kanak Biscuitwala <kanak@apache.org>
Committed: Thu Oct 24 18:35:03 2013 -0700

----------------------------------------------------------------------
 .../helix/integration/TestCustomizedIdealStateRebalancer.java     | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/74483638/helix-core/src/test/java/org/apache/helix/integration/TestCustomizedIdealStateRebalancer.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/TestCustomizedIdealStateRebalancer.java
b/helix-core/src/test/java/org/apache/helix/integration/TestCustomizedIdealStateRebalancer.java
index 4575def..f4c3c35 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/TestCustomizedIdealStateRebalancer.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/TestCustomizedIdealStateRebalancer.java
@@ -45,6 +45,7 @@ public class TestCustomizedIdealStateRebalancer extends
     ZkStandAloneCMTestBaseWithPropertyServerCheck {
   String db2 = TEST_DB + "2";
   static boolean testRebalancerCreated = false;
+  static boolean testRebalancerInvoked = false;
 
   public static class TestRebalancer implements Rebalancer {
 
@@ -56,6 +57,7 @@ public class TestCustomizedIdealStateRebalancer extends
     @Override
     public IdealState computeNewIdealState(String resourceName, IdealState currentIdealState,
         CurrentStateOutput currentStateOutput, ClusterDataCache clusterData) {
+      testRebalancerInvoked = true;
       for (String partition : currentIdealState.getPartitionSet()) {
         String instance = currentIdealState.getPreferenceList(partition).get(0);
         currentIdealState.getPreferenceList(partition).clear();
@@ -99,6 +101,7 @@ public class TestCustomizedIdealStateRebalancer extends
       Assert.assertEquals(is.getInstanceStateMap(partition).size(), 3);
     }
     Assert.assertTrue(testRebalancerCreated);
+    Assert.assertTrue(testRebalancerInvoked);
   }
 
   public static class ExternalViewBalancedVerifier implements ZkVerifier {


Mime
View raw message