diff --git a/core/src/main/java/com/datastax/oss/driver/internal/core/control/ControlConnection.java b/core/src/main/java/com/datastax/oss/driver/internal/core/control/ControlConnection.java index 460564c69df..6cf16f9c4de 100644 --- a/core/src/main/java/com/datastax/oss/driver/internal/core/control/ControlConnection.java +++ b/core/src/main/java/com/datastax/oss/driver/internal/core/control/ControlConnection.java @@ -300,7 +300,8 @@ private void init( .withOwnerLogPrefix(logPrefix + "|control") .build(); - Queue nodes = context.getLoadBalancingPolicyWrapper().newQueryPlan(); + Queue nodes = + context.getLoadBalancingPolicyWrapper().newControlReconnectionQueryPlan(); connect( nodes, diff --git a/core/src/main/java/com/datastax/oss/driver/internal/core/metadata/LoadBalancingPolicyWrapper.java b/core/src/main/java/com/datastax/oss/driver/internal/core/metadata/LoadBalancingPolicyWrapper.java index 0d470939573..7922b7b5780 100644 --- a/core/src/main/java/com/datastax/oss/driver/internal/core/metadata/LoadBalancingPolicyWrapper.java +++ b/core/src/main/java/com/datastax/oss/driver/internal/core/metadata/LoadBalancingPolicyWrapper.java @@ -161,11 +161,6 @@ public Queue newQueryPlan( } } - @NonNull - public Queue newQueryPlan() { - return newQueryPlan(null, DriverExecutionProfile.DEFAULT_NAME, null); - } - @NonNull public Queue newControlReconnectionQueryPlan() { // First try the original way diff --git a/core/src/test/java/com/datastax/oss/driver/internal/core/control/ControlConnectionTestBase.java b/core/src/test/java/com/datastax/oss/driver/internal/core/control/ControlConnectionTestBase.java index 9deaca25308..64c9f06b42e 100644 --- a/core/src/test/java/com/datastax/oss/driver/internal/core/control/ControlConnectionTestBase.java +++ b/core/src/test/java/com/datastax/oss/driver/internal/core/control/ControlConnectionTestBase.java @@ -141,7 +141,7 @@ public void setup() { } protected void mockQueryPlan(Node... nodes) { - when(loadBalancingPolicyWrapper.newQueryPlan()) + when(loadBalancingPolicyWrapper.newControlReconnectionQueryPlan()) .thenAnswer( i -> { ConcurrentLinkedQueue queryPlan = new ConcurrentLinkedQueue<>(); diff --git a/core/src/test/java/com/datastax/oss/driver/internal/core/metadata/LoadBalancingPolicyWrapperTest.java b/core/src/test/java/com/datastax/oss/driver/internal/core/metadata/LoadBalancingPolicyWrapperTest.java index 1a0292e3947..a77c27e7fbf 100644 --- a/core/src/test/java/com/datastax/oss/driver/internal/core/metadata/LoadBalancingPolicyWrapperTest.java +++ b/core/src/test/java/com/datastax/oss/driver/internal/core/metadata/LoadBalancingPolicyWrapperTest.java @@ -121,7 +121,7 @@ public void setup() { @Test public void should_build_query_plan_from_contact_points_before_init() { // When - Queue queryPlan = wrapper.newQueryPlan(); + Queue queryPlan = wrapper.newControlReconnectionQueryPlan(); // Then for (LoadBalancingPolicy policy : ImmutableList.of(policy1, policy2, policy3)) { @@ -139,7 +139,7 @@ public void should_fetch_query_plan_from_policy_after_init() { } // When - Queue queryPlan = wrapper.newQueryPlan(); + Queue queryPlan = wrapper.newControlReconnectionQueryPlan(); // Then // no-arg newQueryPlan() uses the default profile