Skip to content

Commit

Permalink
Remove no-longer needed test from RebalancePartitionsInfoTest; annota…
Browse files Browse the repository at this point in the history
…ted another test as mostly failing..
  • Loading branch information
jayjwylie committed Jun 20, 2013
1 parent 8a9a791 commit 4fdeaf2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
Expand Up @@ -45,6 +45,7 @@
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;

// TODO: This suite of tests is known to mostly fail. Sorry.
// TODO: This test needs to be mostly re-written. The planning algorithm has
// changed and this test focused on the implementation of the prior planning
// algorithm, rather than the features of a plan in general.
Expand Down
@@ -1,7 +1,6 @@
package voldemort.client.rebalance;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;

import java.util.HashMap;
import java.util.List;
Expand Down Expand Up @@ -29,27 +28,13 @@ public void testRebalancePartitionsInfoCreate() {
HashMap<Integer, List<Integer>> testMap = new HashMap<Integer, List<Integer>>();
testMap.put(1, Lists.newArrayList(1));
HashMap<String, HashMap<Integer, List<Integer>>> storeTestMap1 = Maps.newHashMap();
HashMap<String, HashMap<Integer, List<Integer>>> storeTestMap2 = Maps.newHashMap();

// TEST 2 ) With empty maps
info = new RebalancePartitionsInfo(0, 1, storeTestMap1, ServerTestUtils.getLocalCluster(1));
jsonString = info.toJsonString();
info2 = RebalancePartitionsInfo.create(jsonString);
assertEquals(info, info2);

// TEST 3 ) With different stores
storeTestMap1.put("test1", testMap);
storeTestMap2.put("test2", testMap);

try {
info = new RebalancePartitionsInfo(0,
1,
storeTestMap1,
ServerTestUtils.getLocalCluster(1));

fail("Should have thrown an exception");
} catch(Exception e) {}

// TEST 3 ) With some more replicas
testMap.put(3, Lists.newArrayList(1, 3, 5));
info = new RebalancePartitionsInfo(0, 1, storeTestMap1, ServerTestUtils.getLocalCluster(1));
Expand Down

0 comments on commit 4fdeaf2

Please sign in to comment.