Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
fix
  • Loading branch information
xxhZs committed Jun 7, 2024
1 parent bb21b3c commit 14234de
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions ci/scripts/e2e-cassandra-sink-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,24 @@ sleep 1
echo "--- create cassandra table"
curl https://downloads.apache.org/cassandra/4.0.13/apache-cassandra-4.0.13-bin.tar.gz --output apache-cassandra-4.0.13-bin.tar.gz
tar xfvz apache-cassandra-4.0.13-bin.tar.gz
# 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 apache-cassandra-4.0.13/lib/six-1.12.0-py2.py3-none-any.zip
rm apache-cassandra-4.0.13/lib/cassandra-driver-internal-only-3.25.0.zip
apt-get install -y libev4 libev-dev
pip3 install --break-system-packages cassandra-driver

cd apache-cassandra-4.0.13/bin
./cqlsh cassandra-server -e "CREATE KEYSPACE demo WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1};use demo;
cd apache-cassandra-4.0.13


bin/cassandra -R &
CASSANDRA_PID=$!
sleep 30

./bin/cqlsh -e "CREATE KEYSPACE demo WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1};use demo;
CREATE table demo_bhv_table(v1 int primary key,v2 smallint,v3 bigint,v4 float,v5 double,v6 text,v7 date,v8 timestamp,v9 boolean);"

echo "--- testing sinks"
cd ../../
cd ../
sqllogictest -p 4566 -d dev './e2e_test/sink/cassandra_sink.slt'
sleep 1
cd apache-cassandra-4.0.13/bin
Expand All @@ -61,5 +72,10 @@ else
fi

echo "--- Kill cluster"

trap 'kill $CASSANDRA_PID' SIGINT
wait $CASSANDRA_PID
echo "cassandra finished"

cd ../../
risedev ci-kill

0 comments on commit 14234de

Please sign in to comment.