|
24 | 24 | import static com.datastax.driver.core.CreateCCM.TestMode.PER_CLASS;
|
25 | 25 | import static com.datastax.driver.core.CreateCCM.TestMode.PER_METHOD;
|
26 | 26 | import static com.datastax.driver.core.TestUtils.CREATE_KEYSPACE_SIMPLE_FORMAT;
|
27 |
| -import static com.datastax.driver.core.TestUtils.addressOfNode; |
28 | 27 | import static com.datastax.driver.core.TestUtils.executeNoFail;
|
29 | 28 | import static com.datastax.driver.core.TestUtils.ipOfNode;
|
30 | 29 | import static org.assertj.core.api.Assertions.fail;
|
|
40 | 39 | import com.google.common.util.concurrent.Uninterruptibles;
|
41 | 40 | import java.io.Closeable;
|
42 | 41 | import java.io.File;
|
43 |
| -import java.io.FileInputStream; |
44 | 42 | import java.io.IOException;
|
45 | 43 | import java.lang.annotation.Annotation;
|
46 | 44 | import java.lang.reflect.Constructor;
|
@@ -778,26 +776,7 @@ public Cluster.Builder createClusterBuilderScyllaCloud() throws IOException {
|
778 | 776 | File clusterFile = new File(ccmdir, ccm.getClusterName());
|
779 | 777 | File yamlFile = new File(clusterFile, "config_data.yaml");
|
780 | 778 |
|
781 |
| - final ScyllaCloudConnectionConfig cloudConfig = |
782 |
| - ScyllaCloudConnectionConfig.fromInputStream(new FileInputStream(yamlFile)); |
783 |
| - |
784 |
| - builder.withScyllaCloudConnectionConfig(cloudConfig); |
785 |
| - builder.withEndPointFactory( |
786 |
| - new MockSniEndPointFactory( |
787 |
| - InetSocketAddress.createUnresolved( |
788 |
| - addressOfNode(1).getHostAddress(), |
789 |
| - cloudConfig.getCurrentDatacenter().getServer().getPort()), |
790 |
| - builder.getConfiguration().getPolicies().getEndPointFactory())); |
791 |
| - builder.addContactPoint( |
792 |
| - new SniEndPoint( |
793 |
| - InetSocketAddress.createUnresolved( |
794 |
| - addressOfNode(1).getHostAddress(), |
795 |
| - cloudConfig.getCurrentDatacenter().getServer().getPort()), |
796 |
| - cloudConfig.getCurrentDatacenter().getServer().getHostName())); |
797 |
| - |
798 |
| - builder |
799 |
| - .withCodecRegistry(new CodecRegistry()) |
800 |
| - .withPort(cloudConfig.getCurrentDatacenter().getServer().getPort()); |
| 779 | + builder.withScyllaCloudConnectionConfig(yamlFile); |
801 | 780 | return builder;
|
802 | 781 | }
|
803 | 782 |
|
|
0 commit comments