Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 108 additions & 9 deletions versions/datastax/4.19.1/patch
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ index 724508d38..8a85d32bb 100644
public void should_fail_on_timeout() {
CCM_RULE.getCcmBridge().pause(2);
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/SchemaChangesIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/SchemaChangesIT.java
index 85fcfc02c..17e4d2595 100644
index 85fcfc02c..e1dab54de 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/SchemaChangesIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/SchemaChangesIT.java
@@ -47,6 +47,7 @@ import java.util.function.Consumer;
Expand All @@ -472,7 +472,50 @@ index 85fcfc02c..17e4d2595 100644
import org.junit.Test;
import org.junit.rules.RuleChain;
import org.junit.rules.TestRule;
@@ -260,8 +261,9 @@ public class SchemaChangesIT {
@@ -93,16 +94,15 @@ public class SchemaChangesIT {
null,
String.format(
"CREATE KEYSPACE %s "
- + "WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1}",
+ + "WITH replication = {'class': 'NetworkTopologyStrategy', 'dc1': 1}",
newKeyspaceId),
metadata -> metadata.getKeyspace(newKeyspaceId),
keyspace -> {
assertThat(keyspace.getName()).isEqualTo(newKeyspaceId);
assertThat(keyspace.isDurableWrites()).isTrue();
assertThat(keyspace.getReplication())
- .hasSize(2)
- .containsEntry("class", "org.apache.cassandra.locator.SimpleStrategy")
- .containsEntry("replication_factor", "1");
+ .containsEntry("class", "org.apache.cassandra.locator.NetworkTopologyStrategy")
+ .containsEntry("dc1", "1");
},
(listener, keyspace) -> verify(listener).onKeyspaceCreated(keyspace),
newKeyspaceId);
@@ -115,7 +115,7 @@ public class SchemaChangesIT {
ImmutableList.of(
String.format(
"CREATE KEYSPACE %s "
- + "WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1}",
+ + "WITH replication = {'class': 'NetworkTopologyStrategy', 'dc1': 1}",
newKeyspaceId.asCql(true))),
String.format("DROP KEYSPACE %s", newKeyspaceId.asCql(true)),
metadata -> metadata.getKeyspace(newKeyspaceId),
@@ -130,11 +130,11 @@ public class SchemaChangesIT {
ImmutableList.of(
String.format(
"CREATE KEYSPACE %s "
- + "WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1}",
+ + "WITH replication = {'class': 'NetworkTopologyStrategy', 'dc1': 1}",
newKeyspaceId.asCql(true))),
String.format(
"ALTER KEYSPACE %s "
- + "WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1} "
+ + "WITH replication = {'class': 'NetworkTopologyStrategy', 'dc1': 1} "
+ "AND durable_writes = 'false'",
newKeyspaceId.asCql(true)),
metadata -> metadata.getKeyspace(newKeyspaceId),
@@ -260,8 +260,9 @@ public class SchemaChangesIT {
assertThat(view.getName().asInternal()).isEqualTo("highscores");
assertThat(view.getBaseTable().asInternal()).isEqualTo("scores");
assertThat(view.includesAllColumns()).isFalse();
Expand All @@ -484,15 +527,15 @@ index 85fcfc02c..17e4d2595 100644
assertThat(view.getColumns())
.containsOnlyKeys(
CqlIdentifier.fromInternal("game"),
@@ -271,6 +273,7 @@ public class SchemaChangesIT {
@@ -271,6 +272,7 @@ public class SchemaChangesIT {
(listener, view) -> verify(listener).onViewCreated(view));
}

+ @Ignore("Driver matrix incompatible. wrong case of NULL is returned in schema of MV")
@Test
public void should_handle_view_drop() {
assumeThat(CCM_RULE.getCcmBridge().getCassandraVersion().compareTo(Version.V3_0_0) >= 0)
@@ -314,6 +317,8 @@ public class SchemaChangesIT {
@@ -314,6 +316,8 @@ public class SchemaChangesIT {
(listener, oldView, newView) -> verify(listener).onViewUpdated(newView, oldView));
}

Expand All @@ -501,7 +544,7 @@ index 85fcfc02c..17e4d2595 100644
@Test
public void should_handle_function_creation() {
assumeThat(CCM_RULE.getCcmBridge().getCassandraVersion().compareTo(Version.V2_2_0) >= 0)
@@ -338,6 +343,8 @@ public class SchemaChangesIT {
@@ -338,6 +342,8 @@ public class SchemaChangesIT {
(listener, function) -> verify(listener).onFunctionCreated(function));
}

Expand All @@ -510,7 +553,7 @@ index 85fcfc02c..17e4d2595 100644
@Test
public void should_handle_function_drop() {
assumeThat(CCM_RULE.getCcmBridge().getCassandraVersion().compareTo(Version.V2_2_0) >= 0)
@@ -354,6 +361,8 @@ public class SchemaChangesIT {
@@ -354,6 +360,8 @@ public class SchemaChangesIT {
(listener, oldFunction) -> verify(listener).onFunctionDropped(oldFunction));
}

Expand All @@ -519,7 +562,7 @@ index 85fcfc02c..17e4d2595 100644
@Test
public void should_handle_function_update() {
assumeThat(CCM_RULE.getCcmBridge().getCassandraVersion().compareTo(Version.V2_2_0) >= 0)
@@ -374,6 +383,8 @@ public class SchemaChangesIT {
@@ -374,6 +382,8 @@ public class SchemaChangesIT {
verify(listener).onFunctionUpdated(newFunction, oldFunction));
}

Expand All @@ -528,7 +571,7 @@ index 85fcfc02c..17e4d2595 100644
@Test
public void should_handle_aggregate_creation() {
assumeThat(CCM_RULE.getCcmBridge().getCassandraVersion().compareTo(Version.V2_2_0) >= 0)
@@ -400,6 +411,8 @@ public class SchemaChangesIT {
@@ -400,6 +410,8 @@ public class SchemaChangesIT {
(listener, aggregate) -> verify(listener).onAggregateCreated(aggregate));
}

Expand All @@ -537,7 +580,7 @@ index 85fcfc02c..17e4d2595 100644
@Test
public void should_handle_aggregate_drop() {
assumeThat(CCM_RULE.getCcmBridge().getCassandraVersion().compareTo(Version.V2_2_0) >= 0)
@@ -417,6 +430,8 @@ public class SchemaChangesIT {
@@ -417,6 +429,8 @@ public class SchemaChangesIT {
(listener, oldAggregate) -> verify(listener).onAggregateDropped(oldAggregate));
}

Expand Down Expand Up @@ -574,6 +617,23 @@ index df5571974..317422e06 100644
@BackendRequirement(
type = BackendType.CASSANDRA,
minInclusive = "4.0",
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/TokenITBase.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/TokenITBase.java
index 057461a1b..393b968cd 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/TokenITBase.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/core/metadata/TokenITBase.java
@@ -56,10 +56,10 @@ public abstract class TokenITBase {
for (String statement :
ImmutableList.of(
String.format(
- "CREATE KEYSPACE %s WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1}",
+ "CREATE KEYSPACE %s WITH replication = {'class': 'NetworkTopologyStrategy', 'dc1': 1}",
KS1.asCql(false)),
String.format(
- "CREATE KEYSPACE %s WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 2}",
+ "CREATE KEYSPACE %s WITH replication = {'class': 'NetworkTopologyStrategy', 'dc1': 2}",
KS2.asCql(false)),

// Shouldn't really do that, but it makes the rest of the tests a bit prettier.
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/core/metrics/DropwizardMetricsIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/core/metrics/DropwizardMetricsIT.java
index e0184516e..c0c086179 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/core/metrics/DropwizardMetricsIT.java
Expand Down Expand Up @@ -639,6 +699,32 @@ index e0f332915..66a3d81fc 100644
@Test
public void should_signal_and_destroy_pool_when_node_gets_removed() {
RemovalListener removalListener = new RemovalListener();
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/DefaultKeyspaceIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/DefaultKeyspaceIT.java
index 30a808e87..376834519 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/DefaultKeyspaceIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/DefaultKeyspaceIT.java
@@ -75,7 +75,7 @@ public class DefaultKeyspaceIT {
session.execute(
SimpleStatement.builder(
String.format(
- "CREATE KEYSPACE IF NOT EXISTS %s WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1}",
+ "CREATE KEYSPACE IF NOT EXISTS %s WITH replication = {'class': 'NetworkTopologyStrategy', 'dc1': 1}",
DEFAULT_KEYSPACE))
.setExecutionProfile(SESSION_RULE.slowProfile())
.build());
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/QueryKeyspaceAndTableIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/QueryKeyspaceAndTableIT.java
index 9391c0363..06810507e 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/QueryKeyspaceAndTableIT.java
+++ b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/QueryKeyspaceAndTableIT.java
@@ -67,7 +67,7 @@ public class QueryKeyspaceAndTableIT {
ImmutableList.of(
"CREATE TABLE foo(k int PRIMARY KEY)",
String.format(
- "CREATE KEYSPACE IF NOT EXISTS %s WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1}",
+ "CREATE KEYSPACE IF NOT EXISTS %s WITH replication = {'class': 'NetworkTopologyStrategy', 'dc1': 1}",
OTHER_KEYSPACE.asCql(false)),
String.format("CREATE TABLE %s.foo(k int PRIMARY KEY)", OTHER_KEYSPACE.asCql(false)))) {
session.execute(
diff --git a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/QueryReturnTypesIT.java b/integration-tests/src/test/java/com/datastax/oss/driver/mapper/QueryReturnTypesIT.java
index c6e909122..ddaf74f07 100644
--- a/integration-tests/src/test/java/com/datastax/oss/driver/mapper/QueryReturnTypesIT.java
Expand Down Expand Up @@ -999,3 +1085,16 @@ index 0819f7854..16c88c43a 100644
builder.withCassandraConfiguration("num_tokens", "1");
builder.withCassandraConfiguration("initial_token", "0");
}
diff --git a/test-infra/src/main/java/com/datastax/oss/driver/api/testinfra/session/SessionUtils.java b/test-infra/src/main/java/com/datastax/oss/driver/api/testinfra/session/SessionUtils.java
index 7536c0ffd..6e13cc5cf 100644
--- a/test-infra/src/main/java/com/datastax/oss/driver/api/testinfra/session/SessionUtils.java
+++ b/test-infra/src/main/java/com/datastax/oss/driver/api/testinfra/session/SessionUtils.java
@@ -198,7 +198,7 @@ public class SessionUtils {
SimpleStatement createKeyspace =
SimpleStatement.builder(
String.format(
- "CREATE KEYSPACE %s WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 };",
+ "CREATE KEYSPACE %s WITH REPLICATION = { 'class' : 'NetworkTopologyStrategy', 'dc1' : 1 };",
keyspace.asCql(false)))
.setExecutionProfile(profile)
.build();
Loading
Loading