kikocis/java-driver public
Changesets · Branches · Tags · Compare
| Changeset | dd058c9e3c8fc4899148f33b63696014374a4292c2e1d838c95f3666b3223dc9 |
|---|---|
| Author | olim7t <omichallat+github@gmail.com> · 2014-12-11 18:02 +01:00 |
| Committer | olim7t <omichallat+github@gmail.com> · 2014-12-11 18:02 +01:00 |
| Parents | 125b3d45cbd8 |
2 files changed
modified driver-core/src/test/java/com/datastax/driver/core/ConsistencyTest.java +14 −6
| @@ -138,7 +138,7 @@ | ||
| 138 | 138 | |
| 139 | 139 | @Test(groups = "long") |
| 140 | 140 | public void testRFTwoTokenAware() throws Throwable { |
| 141 | - Cluster.Builder builder = Cluster.builder().withLoadBalancingPolicy(new TokenAwarePolicy(new RoundRobinPolicy())); | |
| 141 | + Cluster.Builder builder = Cluster.builder().withLoadBalancingPolicy(new TokenAwarePolicy(new RoundRobinPolicy(), false)); | |
| 142 | 142 | CCMBridge.CCMCluster c = CCMBridge.buildCluster(3, builder); |
| 143 | 143 | try { |
| 144 | 144 | |
| @@ -235,7 +235,7 @@ | ||
| 235 | 235 | |
| 236 | 236 | @Test(groups = "long") |
| 237 | 237 | public void testRFThreeTokenAware() throws Throwable { |
| 238 | - Cluster.Builder builder = Cluster.builder().withLoadBalancingPolicy(new TokenAwarePolicy(new RoundRobinPolicy())); | |
| 238 | + Cluster.Builder builder = Cluster.builder().withLoadBalancingPolicy(new TokenAwarePolicy(new RoundRobinPolicy(), false)); | |
| 239 | 239 | CCMBridge.CCMCluster c = CCMBridge.buildCluster(3, builder); |
| 240 | 240 | try { |
| 241 | 241 | |
| @@ -424,7 +424,9 @@ | ||
| 424 | 424 | |
| 425 | 425 | @Test(groups = "long") |
| 426 | 426 | public void testRFTwoDowngradingCL() throws Throwable { |
| 427 | - Cluster.Builder builder = Cluster.builder().withLoadBalancingPolicy(new TokenAwarePolicy(new RoundRobinPolicy())).withRetryPolicy(DowngradingConsistencyRetryPolicy.INSTANCE); | |
| 427 | + Cluster.Builder builder = Cluster.builder() | |
| 428 | + .withLoadBalancingPolicy(new TokenAwarePolicy(new RoundRobinPolicy(), false)) | |
| 429 | + .withRetryPolicy(DowngradingConsistencyRetryPolicy.INSTANCE); | |
| 428 | 430 | CCMBridge.CCMCluster c = CCMBridge.buildCluster(3, builder); |
| 429 | 431 | try { |
| 430 | 432 | |
| @@ -483,7 +485,9 @@ | ||
| 483 | 485 | |
| 484 | 486 | @Test(groups = "long") |
| 485 | 487 | public void testRFThreeTokenAwareDowngradingCL() throws Throwable { |
| 486 | - Cluster.Builder builder = Cluster.builder().withLoadBalancingPolicy(new TokenAwarePolicy(new RoundRobinPolicy())).withRetryPolicy(DowngradingConsistencyRetryPolicy.INSTANCE); | |
| 488 | + Cluster.Builder builder = Cluster.builder() | |
| 489 | + .withLoadBalancingPolicy(new TokenAwarePolicy(new RoundRobinPolicy(), false)) | |
| 490 | + .withRetryPolicy(DowngradingConsistencyRetryPolicy.INSTANCE); | |
| 487 | 491 | testRFThreeDowngradingCL(builder); |
| 488 | 492 | } |
| 489 | 493 | |
| @@ -549,7 +553,9 @@ | ||
| 549 | 553 | |
| 550 | 554 | @Test(groups = "long") |
| 551 | 555 | public void testRFThreeDowngradingCLTwoDCs() throws Throwable { |
| 552 | - Cluster.Builder builder = Cluster.builder().withLoadBalancingPolicy(new TokenAwarePolicy(new RoundRobinPolicy())).withRetryPolicy(DowngradingConsistencyRetryPolicy.INSTANCE); | |
| 556 | + Cluster.Builder builder = Cluster.builder() | |
| 557 | + .withLoadBalancingPolicy(new TokenAwarePolicy(new RoundRobinPolicy(), false)) | |
| 558 | + .withRetryPolicy(DowngradingConsistencyRetryPolicy.INSTANCE); | |
| 553 | 559 | CCMBridge.CCMCluster c = CCMBridge.buildCluster(3, 3, builder); |
| 554 | 560 | try { |
| 555 | 561 | |
| @@ -646,7 +652,9 @@ | ||
| 646 | 652 | |
| 647 | 653 | @Test(groups = "long") |
| 648 | 654 | public void testRFThreeDowngradingCLTwoDCsDCAware() throws Throwable { |
| 649 | - Cluster.Builder builder = Cluster.builder().withLoadBalancingPolicy(new TokenAwarePolicy(new DCAwareRoundRobinPolicy("dc2"))).withRetryPolicy(DowngradingConsistencyRetryPolicy.INSTANCE); | |
| 655 | + Cluster.Builder builder = Cluster.builder() | |
| 656 | + .withLoadBalancingPolicy(new TokenAwarePolicy(new DCAwareRoundRobinPolicy("dc2"), false)) | |
| 657 | + .withRetryPolicy(DowngradingConsistencyRetryPolicy.INSTANCE); | |
| 650 | 658 | CCMBridge.CCMCluster c = CCMBridge.buildCluster(3, 3, builder); |
| 651 | 659 | try { |
| 652 | 660 |
modified driver-core/src/test/java/com/datastax/driver/core/LoadBalancingPolicyTest.java +1 −1
| @@ -406,7 +406,7 @@ | ||
| 406 | 406 | |
| 407 | 407 | @Test(groups = "long") |
| 408 | 408 | public void tokenAwareWithRF2Test() throws Throwable { |
| 409 | - Cluster.Builder builder = Cluster.builder().withLoadBalancingPolicy(new TokenAwarePolicy(new RoundRobinPolicy())); | |
| 409 | + Cluster.Builder builder = Cluster.builder().withLoadBalancingPolicy(new TokenAwarePolicy(new RoundRobinPolicy(), false)); | |
| 410 | 410 | CCMBridge.CCMCluster c = CCMBridge.buildCluster(2, builder); |
| 411 | 411 | try { |
| 412 | 412 |