@Category(FlakyTest.class) @Test public void testMissingMemberRedundancy1(){
  Host host=Host.getHost(0);
  VM vm0=host.getVM(0);
  VM vm1=host.getVM(1);
  VM vm2=host.getVM(2);
  createPR(vm0,1);
  createPR(vm1,1);
  createData(vm0,0,NUM_BUCKETS,"a");
  Set<Integer> vm0Buckets=getBucketList(vm0);
  Set<Integer> vm1Buckets=getBucketList(vm1);
  closeCache(vm1);
  checkData(vm0,0,NUM_BUCKETS,"a");
  removeData(vm0,0,NUM_BUCKETS / 2);
  createData(vm0,NUM_BUCKETS / 2,NUM_BUCKETS,"b");
  createPR(vm2,1);
  Set<Integer> vm2Buckets=getBucketList(vm2);
  assertEquals(Collections.emptySet(),vm2Buckets);
  createPR(vm1,1);
  checkData(vm1,0,NUM_BUCKETS / 2,null);
  checkData(vm1,NUM_BUCKETS / 2,NUM_BUCKETS,"b");
  assertEquals(vm0Buckets,getBucketList(vm0));
  assertEquals(vm1Buckets,getBucketList(vm1));
  assertEquals(Collections.emptySet(),getBucketList(vm2));
}

@ Category ( FlakyTest . class ) @ Test public void testMissingMemberRedundancy1 ( ) { Host host = Host . getHost ( 0 ) ; VM vm0 = host . getVM ( 0 ) ; VM vm1 = host . getVM ( 1 ) ; VM vm2 = host . getVM ( 2 ) ; createPR ( vm0 , 1 ) ; createPR ( vm1 , 1 ) ; createData ( vm0 , 0 , NUM_BUCKETS , "a" ) ; Set < Integer > vm0Buckets = getBucketList ( vm0 ) ; Set < Integer > vm1Buckets = getBucketList ( vm1 ) ; closeCache ( vm1 ) ; checkData ( vm0 , 0 , NUM_BUCKETS , "a" ) ; removeData ( vm0 , 0 , NUM_BUCKETS / 2 ) ; createData ( vm0 , NUM_BUCKETS / 2 , NUM_BUCKETS , "b" ) ; createPR ( vm2 , 1 ) ; Set < Integer > vm2Buckets = getBucketList ( vm2 ) ; assertEquals ( Collections . emptySet ( ) , vm2Buckets ) ; createPR ( vm1 , 1 ) ; checkData ( vm1 , 0 , NUM_BUCKETS / 2 , null ) ; checkData ( vm1 , NUM_BUCKETS / 2 , NUM_BUCKETS , "b" ) ; assertEquals ( vm0Buckets , getBucketList ( vm0 ) ) ; assertEquals ( vm1Buckets , getBucketList ( vm1 ) ) ; assertEquals ( Collections . emptySet ( ) , getBucketList ( vm2 ) ) ; }
test the with redundancy 1 , we restore the same buckets when the missing member comes back online .
