Skip to content

Commit

Permalink
refactor(test): rename e2e_test/source to source_legacy
Browse files Browse the repository at this point in the history
Signed-off-by: xxchan <[email protected]>
  • Loading branch information
xxchan committed Oct 14, 2024
1 parent a348b8a commit be6a9ab
Show file tree
Hide file tree
Showing 61 changed files with 31 additions and 31 deletions.
2 changes: 1 addition & 1 deletion ci/scripts/deterministic-e2e-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ echo "--- deterministic simulation e2e, ci-3cn-2fe, batch"
seq "$TEST_NUM" | parallel './risingwave_simulation ./e2e_test/batch/\*\*/\*.slt 2> $LOGDIR/batch-{}.log && rm $LOGDIR/batch-{}.log'

echo "--- deterministic simulation e2e, ci-3cn-2fe, kafka source"
seq "$TEST_NUM" | parallel './risingwave_simulation --kafka-datadir=./scripts/source/test_data ./e2e_test/source/basic/kafka\*.slt 2> $LOGDIR/source-{}.log && rm $LOGDIR/source-{}.log'
seq "$TEST_NUM" | parallel './risingwave_simulation --kafka-datadir=./scripts/source/test_data ./e2e_test/source_legacy/basic/kafka\*.slt 2> $LOGDIR/source-{}.log && rm $LOGDIR/source-{}.log'

echo "--- deterministic simulation e2e, ci-3cn-2fe, parallel, streaming"
seq "$TEST_NUM" | parallel './risingwave_simulation -j 16 ./e2e_test/streaming/\*\*/\*.slt 2> $LOGDIR/parallel-streaming-{}.log && rm $LOGDIR/parallel-streaming-{}.log'
Expand Down
2 changes: 1 addition & 1 deletion ci/scripts/deterministic-recovery-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,4 @@ seq "$TEST_NUM" | parallel './risingwave_simulation \
--kill-rate=${KILL_RATE} \
--kafka-datadir=./scripts/source/test_data \
${EXTRA_ARGS:-} \
./e2e_test/source/basic/kafka\*.slt 2> $LOGDIR/recovery-source-{}.log && rm $LOGDIR/recovery-source-{}.log'
./e2e_test/source_legacy/basic/kafka\*.slt 2> $LOGDIR/recovery-source-{}.log && rm $LOGDIR/recovery-source-{}.log'
4 changes: 2 additions & 2 deletions ci/scripts/e2e-sink-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ risedev ci-kill
echo "--- e2e, ci-1cn-1fe, nexmark endless"
RUST_LOG="info,risingwave_stream=info,risingwave_batch=info,risingwave_storage=info" \
risedev ci-start ci-1cn-1fe
sqllogictest -p 4566 -d dev './e2e_test/source/nexmark_endless_mvs/*.slt'
sqllogictest -p 4566 -d dev './e2e_test/source/nexmark_endless_sinks/*.slt'
sqllogictest -p 4566 -d dev './e2e_test/source_legacy/nexmark_endless_mvs/*.slt'
sqllogictest -p 4566 -d dev './e2e_test/source_legacy/nexmark_endless_sinks/*.slt'

echo "--- Kill cluster"
risedev ci-kill
36 changes: 18 additions & 18 deletions ci/scripts/e2e-source-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ apt-get -y install jq
echo "--- e2e, inline test"
RUST_LOG="debug,risingwave_stream=info,risingwave_batch=info,risingwave_storage=info" \
risedev ci-start ci-inline-source-test
risedev slt './e2e_test/source_inline/**/*.slt'
risedev slt './e2e_test/source_legacy_inline/**/*.slt'
echo "--- Kill cluster"
risedev ci-kill

Expand All @@ -51,12 +51,12 @@ cp src/connector/src/test_data/complex-schema.json ./json-complex-schema
echo "--- e2e, ci-1cn-1fe, mysql & postgres cdc"

# import data to mysql
mysql --host=mysql --port=3306 -u root -p123456 < ./e2e_test/source/cdc/mysql_cdc.sql
mysql --host=mysql --port=3306 -u root -p123456 < ./e2e_test/source_legacy/cdc/mysql_cdc.sql

# import data to postgres
export PGHOST=db PGPORT=5432 PGUSER=postgres PGPASSWORD=postgres PGDATABASE=cdc_test
createdb
psql < ./e2e_test/source/cdc/postgres_cdc.sql
psql < ./e2e_test/source_legacy/cdc/postgres_cdc.sql

echo "--- starting risingwave cluster"
RUST_LOG="debug,risingwave_stream=info,risingwave_batch=info,risingwave_storage=info" \
Expand All @@ -82,30 +82,30 @@ echo 'db.runCommand({ping: 1})' | mongo mongodb://mongodb:27017
echo '> rs config'
echo 'rs.conf()' | mongo mongodb://mongodb:27017
echo '> run test..'
risedev slt './e2e_test/source/cdc/mongodb/**/*.slt'
risedev slt './e2e_test/source_legacy/cdc/mongodb/**/*.slt'

echo "--- inline cdc test"
export MYSQL_HOST=mysql MYSQL_TCP_PORT=3306 MYSQL_PWD=123456
export SQLCMDSERVER=sqlserver-server SQLCMDUSER=SA SQLCMDPASSWORD="SomeTestOnly@SA" SQLCMDDBNAME=mydb SQLCMDPORT=1433
risedev slt './e2e_test/source/cdc_inline/**/*.slt'
risedev slt './e2e_test/source_legacy/cdc_inline/**/*.slt'

echo "--- opendal source test"
risedev slt './e2e_test/source/opendal/**/*.slt'
risedev slt './e2e_test/source_legacy/opendal/**/*.slt'

echo "--- mysql & postgres cdc validate test"
risedev slt './e2e_test/source/cdc/cdc.validate.mysql.slt'
risedev slt './e2e_test/source/cdc/cdc.validate.postgres.slt'
risedev slt './e2e_test/source_legacy/cdc/cdc.validate.mysql.slt'
risedev slt './e2e_test/source_legacy/cdc/cdc.validate.postgres.slt'

echo "--- cdc share source test"
# cdc share stream test cases
export MYSQL_HOST=mysql MYSQL_TCP_PORT=3306 MYSQL_PWD=123456
risedev slt './e2e_test/source/cdc/cdc.share_stream.slt'
risedev slt './e2e_test/source_legacy/cdc/cdc.share_stream.slt'

echo "--- mysql & postgres load and check"
risedev slt './e2e_test/source/cdc/cdc.load.slt'
risedev slt './e2e_test/source_legacy/cdc/cdc.load.slt'
# wait for cdc loading
sleep 10
risedev slt './e2e_test/source/cdc/cdc.check.slt'
risedev slt './e2e_test/source_legacy/cdc/cdc.check.slt'

# kill cluster
risedev kill
Expand All @@ -121,10 +121,10 @@ mysql --protocol=tcp -u root mytest -e "INSERT INTO products


# insert new rows
mysql --host=mysql --port=3306 -u root -p123456 < ./e2e_test/source/cdc/mysql_cdc_insert.sql
mysql --host=mysql --port=3306 -u root -p123456 < ./e2e_test/source_legacy/cdc/mysql_cdc_insert.sql
echo "> inserted new rows into mysql"

psql < ./e2e_test/source/cdc/postgres_cdc_insert.sql
psql < ./e2e_test/source_legacy/cdc/postgres_cdc_insert.sql
echo "> inserted new rows into postgres"

# start cluster w/o clean-data
Expand All @@ -136,13 +136,13 @@ echo "> wait for cluster recovery finish"
sleep 20
echo "> check mviews after cluster recovery"
# check results
risedev slt './e2e_test/source/cdc/cdc.check_new_rows.slt'
risedev slt './e2e_test/source_legacy/cdc/cdc.check_new_rows.slt'

# drop relations
risedev slt './e2e_test/source/cdc/cdc_share_stream_drop.slt'
risedev slt './e2e_test/source_legacy/cdc/cdc_share_stream_drop.slt'

echo "--- postgres_query tvf test"
risedev slt './e2e_test/source/tvf/postgres_query.slt'
risedev slt './e2e_test/source_legacy/tvf/postgres_query.slt'

echo "--- Kill cluster"
risedev ci-kill
Expand All @@ -153,8 +153,8 @@ export RUST_MIN_STACK=4194304
RUST_LOG="info,risingwave_stream=info,risingwave_batch=info,risingwave_storage=info" \
risedev ci-start ci-kafka
./scripts/source/prepare_ci_kafka.sh
risedev slt './e2e_test/source/basic/*.slt'
risedev slt './e2e_test/source/basic/old_row_format_syntax/*.slt'
risedev slt './e2e_test/source_legacy/basic/*.slt'
risedev slt './e2e_test/source_legacy/basic/old_row_format_syntax/*.slt'

echo "--- Run CH-benCHmark"
risedev slt './e2e_test/ch_benchmark/batch/ch_benchmark.slt'
Expand Down
6 changes: 3 additions & 3 deletions e2e_test/source_inline/kafka/consumer_group.slt
Original file line number Diff line number Diff line change
Expand Up @@ -61,21 +61,21 @@ c
sleep 5s

system ok
./e2e_test/source_inline/kafka/consumer_group.mjs --mv mv list-members
./e2e_test/source_legacy_inline/kafka/consumer_group.mjs --mv mv list-members
----
0


# The lag for MV's group is 0.
system ok
./e2e_test/source_inline/kafka/consumer_group.mjs --mv mv list-lags
./e2e_test/source_legacy_inline/kafka/consumer_group.mjs --mv mv list-lags
----
0


# We try to interfere by creating consumers that subscribing to the topic with the RW's group id.
system ok
./e2e_test/source_inline/kafka/consumer_group.mjs --mv mv list-groups | tr ',' '\\n' | xargs -P4 -I {} sh -c "rpk topic consume test_consumer_group -g {}" &
./e2e_test/source_legacy_inline/kafka/consumer_group.mjs --mv mv list-groups | tr ',' '\\n' | xargs -P4 -I {} sh -c "rpk topic consume test_consumer_group -g {}" &

# Wait a while for them to subscribe to the topic.
sleep 15s
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -201,4 +201,4 @@ statement ok
drop table s8

statement ok
drop source s9
drop source s9
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ select * from t;
----

statement ok
drop table t;
drop table t;
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ SELECT * FROM tt1;
1 2023-10-23 10:00:00+00:00

statement ok
drop table tt1;
drop table tt1;
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def do_test(config):

# Do test with slt
ret = os.system(
"sqllogictest -p 4566 -d dev './e2e_test/source/pulsar/pulsar.slt'")
"sqllogictest -p 4566 -d dev './e2e_test/source_legacy/pulsar/pulsar.slt'")
# Clean up
cur.execute('drop table t')

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def do_test(config):

# Do test with slt
ret = os.system(
"sqllogictest -p 4566 -d dev './e2e_test/source/pulsar/pulsar.slt'")
"sqllogictest -p 4566 -d dev './e2e_test/source_legacy/pulsar/pulsar.slt'")
# Clean up
cur.execute('drop table t')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ select * from postgres_query('db', '5432', 'postgres', 'postgres', 'cdc_test', '
97 t 1 1 1 1 1 1.0 2021-01-01 00:00:00 2021-01-01 00:00:00 2021-01-01 08:00:00+00:00 text varchar 1 day {} \x01
98 t 1 1 1 1 1 1.0 2021-01-01 00:00:00 2021-01-01 00:00:00 2021-01-01 08:00:00+00:00 text varchar 1 day {} \x01
99 t 1 1 1 1 1 1.0 2021-01-01 00:00:00 2021-01-01 00:00:00 2021-01-01 08:00:00+00:00 text varchar 1 day {} \x01
100 t 1 1 1 1 1 1.0 2021-01-01 00:00:00 2021-01-01 00:00:00 2021-01-01 08:00:00+00:00 text varchar 1 day {} \x01
100 t 1 1 1 1 1 1.0 2021-01-01 00:00:00 2021-01-01 00:00:00 2021-01-01 08:00:00+00:00 text varchar 1 day {} \x01

0 comments on commit be6a9ab

Please sign in to comment.