From 99f57aa83b9df966f2816d0e3f6a02c615f44901 Mon Sep 17 00:00:00 2001 From: xxhZs <1060434431@qq.com> Date: Fri, 7 Jun 2024 13:51:24 +0800 Subject: [PATCH 1/2] fix --- ci/scripts/e2e-cassandra-sink-test.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ci/scripts/e2e-cassandra-sink-test.sh b/ci/scripts/e2e-cassandra-sink-test.sh index cae03843c4703..3bd2071ce22e4 100755 --- a/ci/scripts/e2e-cassandra-sink-test.sh +++ b/ci/scripts/e2e-cassandra-sink-test.sh @@ -45,9 +45,10 @@ apt-get install -y libev4 libev-dev pip3 install --break-system-packages cassandra-driver cd apache-cassandra-4.1.3/bin +sleep 30 export CQLSH_HOST=cassandra-server export CQLSH_PORT=9042 -./cqlsh -e "CREATE KEYSPACE demo WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1};use demo; +./cqlsh --request-timeout=20 -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" @@ -55,7 +56,7 @@ cd ../../ sqllogictest -p 4566 -d dev './e2e_test/sink/cassandra_sink.slt' sleep 1 cd apache-cassandra-4.1.3/bin -./cqlsh -e "COPY demo.demo_bhv_table TO './query_result.csv' WITH HEADER = false AND ENCODING = 'UTF-8';" +./cqlsh --request-timeout=20 -e "COPY demo.demo_bhv_table TO './query_result.csv' WITH HEADER = false AND ENCODING = 'UTF-8';" if cat ./query_result.csv | awk -F "," '{ exit !($1 == 1 && $2 == 1 && $3 == 1 && $4 == 1.1 && $5 == 1.2 && $6 == "test" && $7 == "2013-01-01" && $8 == "2013-01-01 01:01:01.000+0000" && $9 == "False\r"); }'; then From 132db02039ef5ed05a4cc5ad8bae3b20cf517951 Mon Sep 17 00:00:00 2001 From: xxhZs <1060434431@qq.com> Date: Fri, 7 Jun 2024 14:29:54 +0800 Subject: [PATCH 2/2] fix --- ci/scripts/e2e-cassandra-sink-test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/scripts/e2e-cassandra-sink-test.sh b/ci/scripts/e2e-cassandra-sink-test.sh index 3bd2071ce22e4..41ff0e97190d0 100755 --- a/ci/scripts/e2e-cassandra-sink-test.sh +++ b/ci/scripts/e2e-cassandra-sink-test.sh @@ -33,7 +33,8 @@ tar xf ./risingwave-connector.tar.gz -C ./connector-node echo "--- starting risingwave cluster" risedev ci-start ci-sink-test -sleep 1 +# Wait cassandra server to start +sleep 40 echo "--- create cassandra table" curl https://downloads.apache.org/cassandra/4.1.3/apache-cassandra-4.1.3-bin.tar.gz --output apache-cassandra-4.1.3-bin.tar.gz @@ -45,7 +46,6 @@ apt-get install -y libev4 libev-dev pip3 install --break-system-packages cassandra-driver cd apache-cassandra-4.1.3/bin -sleep 30 export CQLSH_HOST=cassandra-server export CQLSH_PORT=9042 ./cqlsh --request-timeout=20 -e "CREATE KEYSPACE demo WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1};use demo;