Skip to content

Commit

Permalink
refactor(test): rename non-inline-style e2e_test/source to `source_…
Browse files Browse the repository at this point in the history
…legacy` (#18890)

Signed-off-by: xxchan <[email protected]>
  • Loading branch information
xxchan authored Oct 14, 2024
1 parent 7dcd1bd commit 909b715
Show file tree
Hide file tree
Showing 62 changed files with 35 additions and 35 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
34 changes: 17 additions & 17 deletions ci/scripts/e2e-source-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions ci/scripts/pulsar-source-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ risedev ci-start ci-1cn-1fe

echo "--- Run test"
python3 -m pip install --break-system-packages psycopg2-binary
python3 e2e_test/source/pulsar/astra-streaming.py
# python3 e2e_test/source/pulsar/streamnative-cloud.py
python3 e2e_test/source_legacy/pulsar/astra-streaming.py
# python3 e2e_test/source_legacy/pulsar/streamnative-cloud.py

echo "--- Kill cluster"
risedev ci-kill
2 changes: 1 addition & 1 deletion e2e_test/ddl/throttle.slt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# streaming_rate_limit applies to create source, please refer to
# e2e_test/source/basic/kafka.slt.
# e2e_test/source_legacy/basic/kafka.slt.
# backfill_rate_limit applies to create sink, please refer to
# e2e_test/sink/kafka/create_sink.slt.

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.
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ system ok
mysql --protocol=tcp -u root -e "DROP DATABASE IF EXISTS mytest; CREATE DATABASE mytest;"

system ok
mysql --protocol=tcp -u root mytest < e2e_test/source/cdc/mysql_create.sql
mysql --protocol=tcp -u root mytest < e2e_test/source_legacy/cdc/mysql_create.sql

# generate data to mysql
system ok
mysql --protocol=tcp -u root mytest < e2e_test/source/cdc/mysql_init_data.sql
mysql --protocol=tcp -u root mytest < e2e_test/source_legacy/cdc/mysql_init_data.sql

statement ok
create secret mysql_pwd with (
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.
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;
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ system ok
sqlcmd -C -d master -Q 'create database UpperDB COLLATE SQL_Latin1_General_CP1_CS_AS;' -b

system ok
sqlcmd -C -i e2e_test/source/cdc_inline/sql_server_cdc/sql_server_cdc_prepare.sql -b
sqlcmd -C -i e2e_test/source_legacy/cdc_inline/sql_server_cdc/sql_server_cdc_prepare.sql -b

system ok
sqlcmd -C -d UpperDB -Q "CREATE SCHEMA UpperSchema;" -b
Expand Down Expand Up @@ -418,7 +418,7 @@ SELECT id, c_xml from shared_sqlserver_all_data_types order by id;

# ------------ add rows stage ------------
system ok
sqlcmd -C -i e2e_test/source/cdc_inline/sql_server_cdc/sql_server_cdc_insert.sql -b
sqlcmd -C -i e2e_test/source_legacy/cdc_inline/sql_server_cdc/sql_server_cdc_insert.sql -b

system ok
sqlcmd -C -d UpperDB -Q "INSERT INTO UpperSchema.UpperTable VALUES (11, 'Alice');" -b
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ CREATE TABLE diamonds (
) WITH (
connector = 'posix_fs',
match_pattern = 'data*.csv',
posix_fs.root = 'e2e_test/source/opendal/data',
posix_fs.root = 'e2e_test/source_legacy/opendal/data',
) FORMAT PLAIN ENCODE CSV ( without_header = 'false', delimiter = ',');

sleep 10s
Expand Down
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 909b715

Please sign in to comment.