/**
* NOTE: the total number of partitions should remain same for hash
* consistency
*/
public void testAddingPartition() {
StoreDefinition storeDef = ServerTestUtils.getStoreDefs(1).get(0);
Cluster cluster = ServerTestUtils.getLocalCluster(3, new int[][] { { 0, 1, 2, 3 },
{ 4, 5, 6, 7 }, { 8, 9, 10 } });
MetadataStore metadata = ServerTestUtils.createMetadataStore(cluster,
Arrays.asList(storeDef));
InvalidMetadataCheckingStore store = new InvalidMetadataCheckingStore(0,
new DoNothingStore<ByteArray, byte[], byte[]>(storeDef.getName()),
metadata);
try {
// add partitions to node 0 on client side.
Cluster updatedCluster = ServerTestUtils.getLocalCluster(3, new int[][] {
{ 0, 1, 2, 3, 4, 5, 10 }, { 6, 7 }, { 8, 9 } });