Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
dkropachev committed Oct 8, 2024
1 parent be5f5f8 commit 5e4ca90
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,8 @@ private void init(
.withOwnerLogPrefix(logPrefix + "|control")
.build();

Queue<Node> nodes = context.getLoadBalancingPolicyWrapper().newQueryPlan();
Queue<Node> nodes =
context.getLoadBalancingPolicyWrapper().newControlReconnectionQueryPlan();

connect(
nodes,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,6 @@ public Queue<Node> newQueryPlan(
}
}

@NonNull
public Queue<Node> newQueryPlan() {
return newQueryPlan(null, DriverExecutionProfile.DEFAULT_NAME, null);
}

@NonNull
public Queue<Node> newControlReconnectionQueryPlan() {
// First try the original way
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public void setup() {
}

protected void mockQueryPlan(Node... nodes) {
when(loadBalancingPolicyWrapper.newQueryPlan())
when(loadBalancingPolicyWrapper.newControlReconnectionQueryPlan())
.thenAnswer(
i -> {
ConcurrentLinkedQueue<Node> queryPlan = new ConcurrentLinkedQueue<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public void setup() {
@Test
public void should_build_query_plan_from_contact_points_before_init() {
// When
Queue<Node> queryPlan = wrapper.newQueryPlan();
Queue<Node> queryPlan = wrapper.newControlReconnectionQueryPlan();

// Then
for (LoadBalancingPolicy policy : ImmutableList.of(policy1, policy2, policy3)) {
Expand All @@ -139,7 +139,7 @@ public void should_fetch_query_plan_from_policy_after_init() {
}

// When
Queue<Node> queryPlan = wrapper.newQueryPlan();
Queue<Node> queryPlan = wrapper.newControlReconnectionQueryPlan();

// Then
// no-arg newQueryPlan() uses the default profile
Expand Down

0 comments on commit 5e4ca90

Please sign in to comment.