Beispiel #1
0
 @Test(expected = IllegalStateException.class)
 public void addressAndWrongWeightTest() {
   shardsFactory.setAddresses("addr1:1, addr2:2");
   shardsFactory.setWeights("2");
   twoAddressesTest("addr1:1", "addr2:2", 2, 5);
 }
Beispiel #2
0
 @Test(expected = IllegalStateException.class)
 public void addressAndWrongIdsTest() {
   shardsFactory.setAddresses("addr1:1, addr2:2");
   shardsFactory.setIds("shard1");
   twoAddressesTest("shard1", "shard2", 1, 1);
 }
Beispiel #3
0
 @Test
 public void addressAndIdsTest() {
   shardsFactory.setAddresses("addr1:1, addr2:2");
   shardsFactory.setIds("shard1, shard2");
   twoAddressesTest("shard1", "shard2", 1, 1);
 }
Beispiel #4
0
 @Test
 public void addressAndWeightTest() {
   shardsFactory.setAddresses("addr1:1, addr2:2");
   shardsFactory.setWeights("2, 5");
   twoAddressesTest("addr1:1", "addr2:2", 2, 5);
 }
Beispiel #5
0
 @Test
 public void onlyAddressTest() {
   shardsFactory.setAddresses("addr1:1, addr2:2");
   twoAddressesTest("addr1:1", "addr2:2", 1, 1);
 }