kikocis/java-driver public
Changesets · Branches · Tags · Compare
| Changeset | c5cc9d4bc65c877b5941aa386f818cdd15e62fcff3cd22d38d338c1c772b6f21 |
|---|---|
| Author | Alexandre Dutra <alexandre.dutra@datastax.com> · 2015-07-16 14:27 +02:00 |
| Committer | Alexandre Dutra <alexandre.dutra@datastax.com> · 2015-07-16 16:10 +02:00 |
| Parents | 7ac3dee01747 |
6 files changed
modified driver-core/src/test/java/com/datastax/driver/core/RequestHandlerTest.java +5 −1
| @@ -43,7 +43,11 @@ | ||
| 43 | 43 | .build() |
| 44 | 44 | ); |
| 45 | 45 | |
| 46 | - cluster = Cluster.builder().addContactPoint("127.0.0.1").withPort(scassandra.getBinaryPort()) | |
| 46 | + cluster = Cluster.builder() | |
| 47 | + .addContactPoint("127.0.0.1") | |
| 48 | + .withPort(scassandra.getBinaryPort()) | |
| 49 | + // Scassandra does not support V3 nor V4 yet, and V4 may cause the server to crash | |
| 50 | + .withProtocolVersion(ProtocolVersion.V2) | |
| 47 | 51 | .withPoolingOptions(new PoolingOptions() |
| 48 | 52 | .setCoreConnectionsPerHost(HostDistance.LOCAL, 1) |
| 49 | 53 | .setMaxConnectionsPerHost(HostDistance.LOCAL, 1) |
modified driver-core/src/test/java/com/datastax/driver/core/SCassandraCluster.java +1 −1
| @@ -35,7 +35,7 @@ | ||
| 35 | 35 | * and a CCM cluster is not running at the same time. |
| 36 | 36 | */ |
| 37 | 37 | public class SCassandraCluster { |
| 38 | - private static final int BINARY_PORT = 9042; | |
| 38 | + public static final int BINARY_PORT = 9042; | |
| 39 | 39 | private static final int ADMIN_PORT = 9052; |
| 40 | 40 | |
| 41 | 41 | private final List<Scassandra> scassandras; |
modified driver-core/src/test/java/com/datastax/driver/core/ScassandraTestBase.java +1 −1
| @@ -74,7 +74,7 @@ | ||
| 74 | 74 | protected Cluster.Builder createClusterBuilder() { |
| 75 | 75 | Cluster.Builder builder = Cluster.builder() |
| 76 | 76 | .addContactPoint("127.0.0.1") |
| 77 | - // Scassandra does not support V3 yet | |
| 77 | + // Scassandra does not support V3 yet, and V4 may cause the server to crash | |
| 78 | 78 | .withProtocolVersion(ProtocolVersion.V2) |
| 79 | 79 | .withPoolingOptions(new PoolingOptions() |
| 80 | 80 | .setCoreConnectionsPerHost(HostDistance.LOCAL, 1) |
modified driver-core/src/test/java/com/datastax/driver/core/SpeculativeExecutionTest.java +2 −0
| @@ -188,6 +188,8 @@ | ||
| 188 | 188 | |
| 189 | 189 | Cluster cluster = Cluster.builder() |
| 190 | 190 | .addContactPoint(CCMBridge.ipOfNode(2)) |
| 191 | + // Scassandra does not support V3 nor V4 yet, and V4 may cause the server to crash | |
| 192 | + .withProtocolVersion(ProtocolVersion.V2) | |
| 191 | 193 | .withSpeculativeExecutionPolicy(mockPolicy) |
| 192 | 194 | .build(); |
| 193 | 195 |
modified driver-core/src/test/java/com/datastax/driver/core/policies/AbstractRetryPolicyIntegrationTest.java +7 −0
| @@ -69,6 +69,13 @@ | ||
| 69 | 69 | .addContactPoint(CCMBridge.ipOfNode(1)) |
| 70 | 70 | .withRetryPolicy(retryPolicy) |
| 71 | 71 | .withLoadBalancingPolicy(new SortingLoadBalancingPolicy()) |
| 72 | + // Scassandra does not support V3 nor V4 yet, and V4 may cause the server to crash | |
| 73 | + .withProtocolVersion(ProtocolVersion.V2) | |
| 74 | + .withPoolingOptions(new PoolingOptions() | |
| 75 | + .setCoreConnectionsPerHost(HostDistance.LOCAL, 1) | |
| 76 | + .setMaxConnectionsPerHost(HostDistance.LOCAL, 1) | |
| 77 | + .setHeartbeatIntervalSeconds(0)) | |
| 78 | + .withPort(SCassandraCluster.BINARY_PORT) | |
| 72 | 79 | .build(); |
| 73 | 80 | |
| 74 | 81 | session = cluster.connect(); |
modified driver-core/src/test/java/com/datastax/driver/core/policies/DefaultRetryPolicyIntegrationTest.java +3 −4
| @@ -15,10 +15,7 @@ | ||
| 15 | 15 | */ |
| 16 | 16 | package com.datastax.driver.core.policies; |
| 17 | 17 | |
| 18 | -import com.datastax.driver.core.CCMBridge; | |
| 19 | -import com.datastax.driver.core.Cluster; | |
| 20 | -import com.datastax.driver.core.Metrics; | |
| 21 | -import com.datastax.driver.core.Session; | |
| 18 | +import com.datastax.driver.core.*; | |
| 22 | 19 | import com.datastax.driver.core.exceptions.NoHostAvailableException; |
| 23 | 20 | import org.testng.annotations.Test; |
| 24 | 21 | |
| @@ -110,6 +107,8 @@ | ||
| 110 | 107 | |
| 111 | 108 | Cluster whiteListedCluster = Cluster.builder() |
| 112 | 109 | .addContactPoint(CCMBridge.ipOfNode(1)) |
| 110 | + // Scassandra does not support V3 nor V4 yet, and V4 may cause the server to crash | |
| 111 | + .withProtocolVersion(ProtocolVersion.V2) | |
| 113 | 112 | .withRetryPolicy(retryPolicy) |
| 114 | 113 | .withLoadBalancingPolicy(firstHostOnlyPolicy) |
| 115 | 114 | .build(); |