diff --git a/ci/scripts/e2e-cassandra-sink-test.sh b/ci/scripts/e2e-cassandra-sink-test.sh index b222e4a944967..678b97aac4b54 100755 --- a/ci/scripts/e2e-cassandra-sink-test.sh +++ b/ci/scripts/e2e-cassandra-sink-test.sh @@ -41,18 +41,24 @@ wget $(get_latest_cassandra_download_url) -O cassandra_latest.tar.gz tar xfvz cassandra_latest.tar.gz export LATEST_CASSANDRA_VERSION=$(get_latest_cassandra_version) export CASSANDRA_DIR="./apache-cassandra-${LATEST_CASSANDRA_VERSION}" -# remove bundled packages, and use installed packages, because Python 3.12 has removed asyncore, but I failed to install libev support for bundled Python driver. -rm ${CASSANDRA_DIR}/lib/futures-2.1.6-py2.py3-none-any.zip -rm ${CASSANDRA_DIR}/lib/cassandra-driver-internal-only-3.29.0.zip -apt-get install -y libev4 libev-dev -pip3 install --break-system-packages cassandra-driver +# Cassandra only support python 3.11 +apt-get install -y software-properties-common +add-apt-repository ppa:deadsnakes/ppa +apt-get update +apt-get install -y python3.11 +apt-get install -y python3.11-venv +python3.11 -m venv cqlsh_env +source cqlsh_env/bin/activate + export CQLSH_HOST=cassandra-server export CQLSH_PORT=9042 echo "--- testing sinks" sqllogictest -p 4566 -d dev './e2e_test/sink/cassandra_sink.slt' +deactivate + echo "--- Kill cluster" cd ../../ risedev ci-kill \ No newline at end of file