From 9a55639e98b715e683c014ad7cddad83991f15fb Mon Sep 17 00:00:00 2001 From: muzarski Date: Mon, 30 Sep 2024 16:32:52 +0200 Subject: [PATCH 1/2] ci: run AsyncTests.Integration_Cassandra_Close --- Makefile | 51 ++++----------------------------------------------- 1 file changed, 4 insertions(+), 47 deletions(-) diff --git a/Makefile b/Makefile index 996eadcc..f9da495d 100644 --- a/Makefile +++ b/Makefile @@ -2,54 +2,11 @@ EMPTY := SPACE := ${EMPTY} ${EMPTY} ifndef SCYLLA_TEST_FILTER -SCYLLA_TEST_FILTER := $(subst ${SPACE},${EMPTY},ClusterTests.*\ -:BasicsTests.*\ -:ConfigTests.*\ -:ConsistencyTwoNodeClusterTests.*\ -:ConsistencyThreeNodeClusterTests.*\ -:PreparedTests.*\ -:CassandraTypes/CassandraTypesTests/*.Integration_Cassandra_*\ -:BatchSingleNodeClusterTests*:BatchCounterSingleNodeClusterTests*:BatchCounterThreeNodeClusterTests*\ -:ErrorTests.*\ -:SslNoClusterTests*:SslNoSslOnClusterTests*\ -:SchemaMetadataTest.*KeyspaceMetadata:SchemaMetadataTest.*MetadataIterator:SchemaMetadataTest.*View*\ -:TracingTests.*\ -:ByNameTests.*\ -:CompressionTests.*\ -:LoggingTests.*\ -:PreparedMetadataTests.*\ -:UseKeyspaceCaseSensitiveTests.*\ -:-PreparedTests.Integration_Cassandra_PreparedIDUnchangedDuringReprepare\ -:ExecutionProfileTest.InvalidName\ -:*NoCompactEnabledConnection\ -:PreparedMetadataTests.Integration_Cassandra_AlterDoesntUpdateColumnCount\ -:UseKeyspaceCaseSensitiveTests.Integration_Cassandra_ConnectWithKeyspace) +SCYLLA_TEST_FILTER := $(subst ${SPACE},${EMPTY},AsyncTests.Integration_Cassandra_Close) endif ifndef CASSANDRA_TEST_FILTER -CASSANDRA_TEST_FILTER := $(subst ${SPACE},${EMPTY},ClusterTests.*\ -:BasicsTests.*\ -:ConfigTests.*\ -:ConsistencyTwoNodeClusterTests.*\ -:ConsistencyThreeNodeClusterTests.*\ -:PreparedTests.*\ -:CassandraTypes/CassandraTypesTests/*.Integration_Cassandra_*\ -:ErrorTests.*\ -:SslClientAuthenticationTests*:SslNoClusterTests*:SslNoSslOnClusterTests*:SslTests*\ -:SchemaMetadataTest.*KeyspaceMetadata:SchemaMetadataTest.*MetadataIterator:SchemaMetadataTest.*View*\ -:TracingTests.*\ -:ByNameTests.*\ -:CompressionTests.*\ -:LoggingTests.*\ -:PreparedMetadataTests.*\ -:UseKeyspaceCaseSensitiveTests.*\ -:-PreparedTests.Integration_Cassandra_PreparedIDUnchangedDuringReprepare\ -:PreparedTests.Integration_Cassandra_FailFastWhenPreparedIDChangesDuringReprepare\ -:SslTests.Integration_Cassandra_ReconnectAfterClusterCrashAndRestart\ -:ExecutionProfileTest.InvalidName\ -:*NoCompactEnabledConnection\ -:PreparedMetadataTests.Integration_Cassandra_AlterDoesntUpdateColumnCount\ -:UseKeyspaceCaseSensitiveTests.Integration_Cassandra_ConnectWithKeyspace) +CASSANDRA_TEST_FILTER := $(subst ${SPACE},${EMPTY},AsyncTests.Integration_Cassandra_Close) endif ifndef CCM_COMMIT_ID @@ -187,7 +144,7 @@ else run-test-integration-scylla: build-integration-test-bin endif @echo "Running integration tests on scylla ${SCYLLA_VERSION}" - valgrind --error-exitcode=123 --leak-check=full --errors-for-leak-kinds=definite build/cassandra-integration-tests --scylla --version=${SCYLLA_VERSION} --category=CASSANDRA --verbose=ccm --gtest_filter="${SCYLLA_TEST_FILTER}" + build/cassandra-integration-tests --scylla --version=${SCYLLA_VERSION} --category=CASSANDRA --verbose=ccm --gtest_filter="${SCYLLA_TEST_FILTER}" run-test-integration-cassandra: prepare-integration-test download-ccm-cassandra-image install-java8-if-missing ifdef DONT_REBUILD_INTEGRATION_BIN @@ -196,7 +153,7 @@ else run-test-integration-cassandra: build-integration-test-bin endif @echo "Running integration tests on cassandra ${CASSANDRA_VERSION}" - valgrind --error-exitcode=123 --leak-check=full --errors-for-leak-kinds=definite build/cassandra-integration-tests --version=${CASSANDRA_VERSION} --category=CASSANDRA --verbose=ccm --gtest_filter="${CASSANDRA_TEST_FILTER}" + build/cassandra-integration-tests --version=${CASSANDRA_VERSION} --category=CASSANDRA --verbose=ccm --gtest_filter="${CASSANDRA_TEST_FILTER}" run-test-unit: install-cargo-if-missing _update-rust-tooling @cd ${CURRENT_DIR}/scylla-rust-wrapper; cargo test From 28136e8dd6d8d2a8b8ad7cff71b3076bd4e803d5 Mon Sep 17 00:00:00 2001 From: muzarski Date: Mon, 30 Sep 2024 16:58:53 +0200 Subject: [PATCH 2/2] session: clone_arced in cass_session_execute --- scylla-rust-wrapper/src/session.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scylla-rust-wrapper/src/session.rs b/scylla-rust-wrapper/src/session.rs index 9e54737a..8deabd0e 100644 --- a/scylla-rust-wrapper/src/session.rs +++ b/scylla-rust-wrapper/src/session.rs @@ -248,7 +248,7 @@ pub unsafe extern "C" fn cass_session_execute( session_raw: *mut CassSession, statement_raw: *const CassStatement, ) -> *const CassFuture { - let session_opt = ptr_to_ref(session_raw); + let session_opt = clone_arced(session_raw); // DO NOT refer to `statement_opt` inside the async block, as I've done just to face a segfault. let statement_opt = ptr_to_ref(statement_raw);