|
33 | 33 | import com.datastax.oss.driver.internal.core.retry.DefaultRetryPolicy;
|
34 | 34 | import com.datastax.oss.driver.internal.core.type.codec.registry.DefaultCodecRegistry;
|
35 | 35 | import com.ing.data.cassandra.jdbc.optionset.Liquibase;
|
36 |
| -import com.ing.data.cassandra.jdbc.utils.AnotherFakeLoadBalancingPolicy; |
37 |
| -import com.ing.data.cassandra.jdbc.utils.AnotherFakeRetryPolicy; |
38 |
| -import com.ing.data.cassandra.jdbc.utils.FakeLoadBalancingPolicy; |
39 |
| -import com.ing.data.cassandra.jdbc.utils.FakeReconnectionPolicy; |
40 |
| -import com.ing.data.cassandra.jdbc.utils.FakeRetryPolicy; |
41 |
| -import com.ing.data.cassandra.jdbc.utils.FakeSslEngineFactory; |
| 36 | +import com.ing.data.cassandra.jdbc.testing.AnotherFakeLoadBalancingPolicy; |
| 37 | +import com.ing.data.cassandra.jdbc.testing.AnotherFakeRetryPolicy; |
| 38 | +import com.ing.data.cassandra.jdbc.testing.FakeLoadBalancingPolicy; |
| 39 | +import com.ing.data.cassandra.jdbc.testing.FakeReconnectionPolicy; |
| 40 | +import com.ing.data.cassandra.jdbc.testing.FakeRetryPolicy; |
| 41 | +import com.ing.data.cassandra.jdbc.testing.FakeSslEngineFactory; |
42 | 42 | import org.hamcrest.Matchers;
|
43 | 43 | import org.junit.jupiter.api.Test;
|
44 | 44 | import org.mockito.ArgumentCaptor;
|
@@ -155,10 +155,10 @@ void givenValidConfigurationFile_whenGetConnection_createConnectionWithExpectedC
|
155 | 155 | initConnection(KEYSPACE, "configfile=" + confTestUrl.getPath(), "localdatacenter=DC2",
|
156 | 156 | "user=aTestUser", "password=aTestPassword", "serialconsistency=SERIAL", "consistency=ONE",
|
157 | 157 | "requesttimeout=5000", "connecttimeout=8000", "keepalive=false", "tcpnodelay=true", "fetchsize=2000",
|
158 |
| - "loadbalancing=com.ing.data.cassandra.jdbc.utils.FakeLoadBalancingPolicy", |
159 |
| - "retry=com.ing.data.cassandra.jdbc.utils.FakeRetryPolicy", |
160 |
| - "reconnection=com.ing.data.cassandra.jdbc.utils.FakeReconnectionPolicy()", |
161 |
| - "sslenginefactory=com.ing.data.cassandra.jdbc.utils.FakeSslEngineFactory"); |
| 158 | + "loadbalancing=com.ing.data.cassandra.jdbc.testing.FakeLoadBalancingPolicy", |
| 159 | + "retry=com.ing.data.cassandra.jdbc.testing.FakeRetryPolicy", |
| 160 | + "reconnection=com.ing.data.cassandra.jdbc.testing.FakeReconnectionPolicy()", |
| 161 | + "sslenginefactory=com.ing.data.cassandra.jdbc.testing.FakeSslEngineFactory"); |
162 | 162 | assertNotNull(sqlConnection);
|
163 | 163 | assertNotNull(sqlConnection.getSession());
|
164 | 164 | assertNotNull(sqlConnection.getSession().getContext());
|
@@ -275,7 +275,7 @@ void givenNoLoadBalancingPolicy_whenGetConnection_createConnectionWithExpectedCo
|
275 | 275 |
|
276 | 276 | @Test
|
277 | 277 | void givenCustomLoadBalancingPolicy_whenGetConnection_createConnectionWithExpectedConfig() throws Exception {
|
278 |
| - initConnection(KEYSPACE, "loadbalancing=com.ing.data.cassandra.jdbc.utils.FakeLoadBalancingPolicy"); |
| 278 | + initConnection(KEYSPACE, "loadbalancing=com.ing.data.cassandra.jdbc.testing.FakeLoadBalancingPolicy"); |
279 | 279 | assertNotNull(sqlConnection);
|
280 | 280 | assertNotNull(sqlConnection.getSession());
|
281 | 281 | assertNotNull(sqlConnection.getSession().getContext());
|
@@ -308,7 +308,7 @@ void givenNoRetryPolicy_whenGetConnection_createConnectionWithExpectedConfig() t
|
308 | 308 |
|
309 | 309 | @Test
|
310 | 310 | void givenCustomRetryPolicy_whenGetConnection_createConnectionWithExpectedConfig() throws Exception {
|
311 |
| - initConnection(KEYSPACE, "retry=com.ing.data.cassandra.jdbc.utils.FakeRetryPolicy", "localdatacenter=datacenter1"); |
| 311 | + initConnection(KEYSPACE, "retry=com.ing.data.cassandra.jdbc.testing.FakeRetryPolicy", "localdatacenter=datacenter1"); |
312 | 312 | assertNotNull(sqlConnection);
|
313 | 313 | assertNotNull(sqlConnection.getSession());
|
314 | 314 | assertNotNull(sqlConnection.getSession().getContext());
|
@@ -355,7 +355,7 @@ void givenExponentialReconnectionPolicy_whenGetConnection_createConnectionWithEx
|
355 | 355 |
|
356 | 356 | @Test
|
357 | 357 | void givenCustomReconnectionPolicy_whenGetConnection_createConnectionWithExpectedConfig() throws Exception {
|
358 |
| - initConnection(KEYSPACE, "reconnection=com.ing.data.cassandra.jdbc.utils.FakeReconnectionPolicy()", |
| 358 | + initConnection(KEYSPACE, "reconnection=com.ing.data.cassandra.jdbc.testing.FakeReconnectionPolicy()", |
359 | 359 | "localdatacenter=datacenter1");
|
360 | 360 | assertNotNull(sqlConnection);
|
361 | 361 | assertNotNull(sqlConnection.getSession());
|
@@ -474,7 +474,7 @@ void givenSslEngineFactory_whenConfigureSsl_addGivenSslEngineFactoryToSessionBui
|
474 | 474 | cassandraContainer.getContactPoint().getPort(), KEYSPACE, "localdatacenter=datacenter1")), null);
|
475 | 475 | final CqlSessionBuilder cqlSessionBuilder = spy(new CqlSessionBuilder());
|
476 | 476 | sessionHolder.configureSslEngineFactory(cqlSessionBuilder,
|
477 |
| - "com.ing.data.cassandra.jdbc.utils.FakeSslEngineFactory"); |
| 477 | + "com.ing.data.cassandra.jdbc.testing.FakeSslEngineFactory"); |
478 | 478 | verify(cqlSessionBuilder).withSslEngineFactory(any(FakeSslEngineFactory.class));
|
479 | 479 | }
|
480 | 480 |
|
|
0 commit comments