Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

async: fix AsyncTests.Integration_Cassandra_Close #182

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
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
51 changes: 4 additions & 47 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
2 changes: 1 addition & 1 deletion scylla-rust-wrapper/src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Loading