From fe4b8a066aedfd2e10fbbc3392a6d78aff3feb05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Uzarski?= Date: Mon, 5 May 2025 17:43:52 +0200 Subject: [PATCH 1/3] it: adjust and enable ServerSideFailureTests.Warning test 1. The test is skipped for Scylla (Scylla does not emit such warning) - I think it's better to enable it, and skip it during runtime, rather than disabling it at all. 2. The test is adjusted so the WHERE clause is removed (to trigger the warning). The WHERE clause was added here: https://github.com/scylladb/cpp-rust-driver/pull/221 --- Makefile | 2 ++ tests/src/integration/tests/test_server_side_failure.cpp | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 8d9b4175..47407f36 100644 --- a/Makefile +++ b/Makefile @@ -35,6 +35,7 @@ SCYLLA_TEST_FILTER := $(subst ${SPACE},${EMPTY},ClusterTests.*\ :ExecutionProfileTest.Integration_Cassandra_Consistency\ :ExecutionProfileTest.Integration_Cassandra_SerialConsistency\ :ExecutionProfileTest.Integration_Cassandra_LatencyAwareRouting\ +:ServerSideFailureTests.Integration_Cassandra_Warning\ :-PreparedTests.Integration_Cassandra_PreparedIDUnchangedDuringReprepare\ :HeartbeatTests.Integration_Cassandra_HeartbeatFailed\ :ControlConnectionTests.Integration_Cassandra_TopologyChange\ @@ -83,6 +84,7 @@ CASSANDRA_TEST_FILTER := $(subst ${SPACE},${EMPTY},ClusterTests.*\ :ExecutionProfileTest.Integration_Cassandra_Consistency\ :ExecutionProfileTest.Integration_Cassandra_SerialConsistency\ :ExecutionProfileTest.Integration_Cassandra_LatencyAwareRouting\ +:ServerSideFailureTests.Integration_Cassandra_Warning\ :-PreparedTests.Integration_Cassandra_PreparedIDUnchangedDuringReprepare\ :PreparedTests.Integration_Cassandra_FailFastWhenPreparedIDChangesDuringReprepare\ :HeartbeatTests.Integration_Cassandra_HeartbeatFailed\ diff --git a/tests/src/integration/tests/test_server_side_failure.cpp b/tests/src/integration/tests/test_server_side_failure.cpp index 895fcffe..d4ce8192 100644 --- a/tests/src/integration/tests/test_server_side_failure.cpp +++ b/tests/src/integration/tests/test_server_side_failure.cpp @@ -79,9 +79,13 @@ class ServerSideFailureThreeNodeTests : public Integration { CASSANDRA_INTEGRATION_TEST_F(ServerSideFailureTests, Warning) { CHECK_FAILURE; SKIP_IF_CASSANDRA_VERSION_LT(2.2); + if (Options::is_scylla()) { + SKIP_TEST("Scylla does not emit 'Aggregation query used without partition key' warning"); + } - logger_.add_critera("Server-side warning: Aggregation query used without partition key"); - session_.execute("SELECT sum(gossip_generation) FROM system.local WHERE key='local'"); + logger_.add_critera("Response from the database contains a warning, " + "warning: \"Aggregation query used without partition key\""); + session_.execute("SELECT sum(gossip_generation) FROM system.local"); EXPECT_EQ(logger_.count(), 1u); } From ac851f67aa7114409a7e4861fc63201db3a64e66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Uzarski?= Date: Mon, 5 May 2025 17:46:06 +0200 Subject: [PATCH 2/3] it: enable ErrorTableAlreadyExists test This test works for both Cassandra and Scylla - no adjustments are required. --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index 47407f36..7b2c3627 100644 --- a/Makefile +++ b/Makefile @@ -36,6 +36,7 @@ SCYLLA_TEST_FILTER := $(subst ${SPACE},${EMPTY},ClusterTests.*\ :ExecutionProfileTest.Integration_Cassandra_SerialConsistency\ :ExecutionProfileTest.Integration_Cassandra_LatencyAwareRouting\ :ServerSideFailureTests.Integration_Cassandra_Warning\ +:ServerSideFailureTests.Integration_Cassandra_ErrorTableAlreadyExists\ :-PreparedTests.Integration_Cassandra_PreparedIDUnchangedDuringReprepare\ :HeartbeatTests.Integration_Cassandra_HeartbeatFailed\ :ControlConnectionTests.Integration_Cassandra_TopologyChange\ @@ -84,6 +85,7 @@ CASSANDRA_TEST_FILTER := $(subst ${SPACE},${EMPTY},ClusterTests.*\ :ExecutionProfileTest.Integration_Cassandra_Consistency\ :ExecutionProfileTest.Integration_Cassandra_SerialConsistency\ :ExecutionProfileTest.Integration_Cassandra_LatencyAwareRouting\ +:ServerSideFailureTests.Integration_Cassandra_ErrorTableAlreadyExists\ :ServerSideFailureTests.Integration_Cassandra_Warning\ :-PreparedTests.Integration_Cassandra_PreparedIDUnchangedDuringReprepare\ :PreparedTests.Integration_Cassandra_FailFastWhenPreparedIDChangesDuringReprepare\ From 03d3517af5200e10b6ddf5e222d82b6d704dfbe7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Uzarski?= Date: Mon, 5 May 2025 17:56:00 +0200 Subject: [PATCH 3/3] it: explicitly disable UDF server-side failure tests It will be now more clear which tests are failing and should possibly be addressed in the future. The disabled tests from this suite are using UDFs, which are hidden behind unstable feature in Scylla. We may want to enable them in the future, but for now let's leave them disabled. --- Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 7b2c3627..afc21299 100644 --- a/Makefile +++ b/Makefile @@ -25,6 +25,7 @@ SCYLLA_TEST_FILTER := $(subst ${SPACE},${EMPTY},ClusterTests.*\ :LoggingTests.*\ :PreparedMetadataTests.*\ :UseKeyspaceCaseSensitiveTests.*\ +:ServerSideFailureTests.*\ :MetricsTests.Integration_Cassandra_ErrorsRequestTimeouts\ :MetricsTests.Integration_Cassandra_Requests\ :MetricsTests.Integration_Cassandra_StatsShardConnections\ @@ -35,13 +36,13 @@ SCYLLA_TEST_FILTER := $(subst ${SPACE},${EMPTY},ClusterTests.*\ :ExecutionProfileTest.Integration_Cassandra_Consistency\ :ExecutionProfileTest.Integration_Cassandra_SerialConsistency\ :ExecutionProfileTest.Integration_Cassandra_LatencyAwareRouting\ -:ServerSideFailureTests.Integration_Cassandra_Warning\ -:ServerSideFailureTests.Integration_Cassandra_ErrorTableAlreadyExists\ :-PreparedTests.Integration_Cassandra_PreparedIDUnchangedDuringReprepare\ :HeartbeatTests.Integration_Cassandra_HeartbeatFailed\ :ControlConnectionTests.Integration_Cassandra_TopologyChange\ :ControlConnectionTests.Integration_Cassandra_FullOutage\ :ControlConnectionTests.Integration_Cassandra_TerminatedUsingMultipleIoThreadsWithError\ +:ServerSideFailureTests.Integration_Cassandra_ErrorFunctionFailure\ +:ServerSideFailureTests.Integration_Cassandra_ErrorFunctionAlreadyExists\ :*NoCompactEnabledConnection\ :PreparedMetadataTests.Integration_Cassandra_AlterProperlyUpdatesColumnCount\ :UseKeyspaceCaseSensitiveTests.Integration_Cassandra_ConnectWithKeyspace) @@ -75,6 +76,7 @@ CASSANDRA_TEST_FILTER := $(subst ${SPACE},${EMPTY},ClusterTests.*\ :LoggingTests.*\ :PreparedMetadataTests.*\ :UseKeyspaceCaseSensitiveTests.*\ +:ServerSideFailureTests.*\ :MetricsTests.Integration_Cassandra_ErrorsRequestTimeouts\ :MetricsTests.Integration_Cassandra_Requests\ :MetricsTests.Integration_Cassandra_StatsShardConnections\ @@ -85,14 +87,14 @@ CASSANDRA_TEST_FILTER := $(subst ${SPACE},${EMPTY},ClusterTests.*\ :ExecutionProfileTest.Integration_Cassandra_Consistency\ :ExecutionProfileTest.Integration_Cassandra_SerialConsistency\ :ExecutionProfileTest.Integration_Cassandra_LatencyAwareRouting\ -:ServerSideFailureTests.Integration_Cassandra_ErrorTableAlreadyExists\ -:ServerSideFailureTests.Integration_Cassandra_Warning\ :-PreparedTests.Integration_Cassandra_PreparedIDUnchangedDuringReprepare\ :PreparedTests.Integration_Cassandra_FailFastWhenPreparedIDChangesDuringReprepare\ :HeartbeatTests.Integration_Cassandra_HeartbeatFailed\ :ControlConnectionTests.Integration_Cassandra_TopologyChange\ :ControlConnectionTests.Integration_Cassandra_FullOutage\ :ControlConnectionTests.Integration_Cassandra_TerminatedUsingMultipleIoThreadsWithError\ +:ServerSideFailureTests.Integration_Cassandra_ErrorFunctionFailure\ +:ServerSideFailureTests.Integration_Cassandra_ErrorFunctionAlreadyExists\ :SslTests.Integration_Cassandra_ReconnectAfterClusterCrashAndRestart\ :*NoCompactEnabledConnection\ :PreparedMetadataTests.Integration_Cassandra_AlterProperlyUpdatesColumnCount\