Skip to content

Commit 0572bbe

Browse files
Bouncheckfruch
authored andcommitted
Fix should_send_down_notifications_after_init_when_contact_points_are_down for 3.11.4.0
Seen most recently during 6.2 tests. Session in this test method is mistakenly initialized with only 1 node, making following assertion incorrect. Newest 3.x driver has the same fix already done. Closes #47.
1 parent 6d35c54 commit 0572bbe

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
tests:
2+
-

versions/scylla/3.11.4.0/patch

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
diff --git a/driver-core/src/test/java/com/datastax/driver/core/LoadBalancingPolicyBootstrapTest.java b/driver-core/src/test/java/com/datastax/driver/core/LoadBalancingPolicyBootstrapTest.java
2+
index 09f8bf8edb..4f01cb47a6 100644
3+
--- a/driver-core/src/test/java/com/datastax/driver/core/LoadBalancingPolicyBootstrapTest.java
4+
+++ b/driver-core/src/test/java/com/datastax/driver/core/LoadBalancingPolicyBootstrapTest.java
5+
@@ -104,8 +104,16 @@ public class LoadBalancingPolicyBootstrapTest extends CCMTestsSupport {
6+
ccm().stop(nodeToStop);
7+
ccm().waitForDown(nodeToStop);
8+
9+
+ // usually only one contact point is used to build the test cluster
10+
+ // here we explicitly add both endpoints so we can test load
11+
+ // balancing initial connection when the first connection point is down
12+
HistoryPolicy policy = new HistoryPolicy(new RoundRobinPolicy());
13+
- Cluster cluster = register(createClusterBuilder().withLoadBalancingPolicy(policy).build());
14+
+ Cluster cluster =
15+
+ register(
16+
+ createClusterBuilder()
17+
+ .addContactPoints(ccm().getContactPoints().get(1))
18+
+ .withLoadBalancingPolicy(policy)
19+
+ .build());
20+
21+
try {
22+
cluster.init();

0 commit comments

Comments
 (0)