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
23 changes: 23 additions & 0 deletions versions/scylla/3.11.5.18/ignore.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
tests:
# test count on tracing which its content is different in scylla, should be skipped on scylla
# (should_create_tombstone_when_null_value_on_bound_statement)
- PreparedStatementTest

# disable because now CCM uses different ip address and port for the JMX
- CCMBridgeTest

# using 2 node cluster, and stopping one, isn't supported by scylla since raft
# (should_receive_changes_made_while_control_connection_is_down_on_reconnect)
- SchemaChangesCCTest

# as ScyllaSkip mark doesn't seem to function correctly (skipping, but then failing the test again anyway)
# the class is disabled due to unsupported options used for Scylla (should_keep_reconnecting_on_authentication_error)
- ReconnectionTest

# scylla-ccm no longer supports --sni-proxy option
- ScyllaSniProxyTest

# node stop/start sequence causes Scylla to fail to open its binary port within the 5-minute
# CCM timeout, likely due to timing differences vs Cassandra in this driver version
# (should_call_onAdd_with_bootstrap_stop_start)
- NodeRefreshDebouncerTest
92 changes: 92 additions & 0 deletions versions/scylla/3.11.5.18/patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
diff --git a/driver-core/src/test/java/com/datastax/driver/core/CCMBridge.java b/driver-core/src/test/java/com/datastax/driver/core/CCMBridge.java
index 1012033..abf82ce 100644
--- a/driver-core/src/test/java/com/datastax/driver/core/CCMBridge.java
+++ b/driver-core/src/test/java/com/datastax/driver/core/CCMBridge.java
@@ -207,11 +207,14 @@ public class CCMBridge implements CCMAccess {
installArgs.add("-v git:" + branch.trim().replaceAll("\"", ""));
} else if (inputScyllaVersion != null && !inputScyllaVersion.trim().isEmpty()) {
installArgs.add(" --scylla ");
- if (isVersionNumber(inputScyllaVersion)) {
- installArgs.add("-v release:" + inputScyllaVersion);
- } else {
- installArgs.add("-v " + inputScyllaVersion);
- }
+ // Use release: prefix in GitHub Actions (no local tarball); bare version in Jenkins
+ // where SCYLLA_UNIFIED_PACKAGE points CCM to a local tarball via packages_from_env().
+ String scyllaCcmVersion =
+ System.getenv("SCYLLA_UNIFIED_PACKAGE") != null
+ ? inputScyllaVersion
+ : "release:" + inputScyllaVersion;
+ installArgs.add("-v " + scyllaCcmVersion);
+
// Detect Scylla Enterprise - it should start with
// a 4-digit year.
if (inputScyllaVersion.matches("\\d{4}\\..*")) {
@@ -480,10 +483,14 @@ public class CCMBridge implements CCMAccess {

@Override
public InetSocketAddress jmxAddressOfNode(int n) {
+ // For dynamically added nodes (via add()), jmxPorts[] may not have an entry since it is
+ // sized only for nodes declared at cluster-creation time. Fall back to the same deterministic
+ // formula used in add().
+ int port = (n - 1 < jmxPorts.length) ? jmxPorts[n - 1] : (7000 + n * 100);
if (GLOBAL_SCYLLA_VERSION_NUMBER != null) {
- return new InetSocketAddress(ipOfNode(n), jmxPorts[n - 1]);
+ return new InetSocketAddress(ipOfNode(n), port);
} else {
- return new InetSocketAddress("localhost", jmxPorts[n - 1]);
+ return new InetSocketAddress("localhost", port);
}
}

@@ -737,6 +744,10 @@ public class CCMBridge implements CCMAccess {
String binaryItf = ipOfNode(n) + ":" + binaryPort;
String remoteLogItf = ipOfNode(n) + ":" + TestUtils.findAvailablePort();
if (isScylla) {
+ // Use a deterministic JMX port formula to avoid TOCTOU races from findAvailablePort()
+ // and to match the fallback in jmxAddressOfNode() for dynamically added nodes (jmxPorts[]
+ // is sized only for nodes declared at cluster-creation time).
+ int jmxPort = 7000 + n * 100;
// scylla-ccm's `add` command has no thrift option: Scylla never had a Thrift interface.
execute(
CCM_COMMAND
@@ -747,7 +758,7 @@ public class CCMBridge implements CCMAccess {
n,
storageItf,
binaryItf,
- TestUtils.findAvailablePort(),
+ jmxPort,
remoteLogItf);
} else {
String thriftItf = ipOfNode(n) + ":" + thriftPort;
diff --git a/driver-core/src/test/java/com/datastax/driver/core/CCMTestsSupport.java b/driver-core/src/test/java/com/datastax/driver/core/CCMTestsSupport.java
index c8627f1..514ddb8 100644
--- a/driver-core/src/test/java/com/datastax/driver/core/CCMTestsSupport.java
+++ b/driver-core/src/test/java/com/datastax/driver/core/CCMTestsSupport.java
@@ -1023,7 +1023,10 @@ public class CCMTestsSupport {
try {
keyspace = TestUtils.generateIdentifier("ks_");
LOGGER.debug("Using keyspace " + keyspace);
- session.execute(String.format(CREATE_KEYSPACE_SIMPLE_FORMAT, keyspace, 1));
+ boolean isScylla = CCMBridge.getGlobalScyllaVersion() != null;
+ session.execute(
+ String.format(CREATE_KEYSPACE_SIMPLE_FORMAT, keyspace, 1)
+ + (isScylla ? " AND tablets = {'enabled': false}" : ""));
useKeyspace(keyspace);
} catch (Exception e) {
errorOut();
diff --git a/driver-core/src/test/java/com/datastax/driver/core/SessionStressTest.java b/driver-core/src/test/java/com/datastax/driver/core/SessionStressTest.java
index ea75f84..ea70e90 100644
--- a/driver-core/src/test/java/com/datastax/driver/core/SessionStressTest.java
+++ b/driver-core/src/test/java/com/datastax/driver/core/SessionStressTest.java
@@ -38,7 +38,9 @@ import org.slf4j.LoggerFactory;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.Test;

-@CCMConfig(dirtiesContext = true)
+@CCMConfig(
+ dirtiesContext = true,
+ jvmArgs = {"--smp", "1", "--max-networking-io-control-blocks", "15000"})
public class SessionStressTest extends CCMTestsSupport {

private static final Logger logger = LoggerFactory.getLogger(SessionStressTest.class);
14 changes: 14 additions & 0 deletions versions/scylla/4.19.2.1/ignore.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
tests:
# awaitScyllaAuth times out waiting for Scylla auth to become available (30s exceeded)
- PlainTextAuthProviderIT
# ccm start fails intermittently when starting clusters inside test methods
# (both TLS and non-TLS variants); ignore the whole class to avoid flakiness
- ClientRoutesIT
# Event-driven config reload is flaky in the matrix runner.
- DriverExecutionProfileReloadIT
# PeersV2NodeRefreshIT fails with BindNodeException on hardcoded port 49152 when
# the port is still occupied from a prior test run in the same CI job.
# Root cause: NodePerPortResolver missing release() override + shared static singleton.
# Fix: https://github.com/scylladb/java-simulacron/pull/5 (issue #4)
# TODO: remove this entry once the simulacron fix is released and picked up in the driver pom.xml
- PeersV2NodeRefreshIT
Loading