diff --git a/ci/scripts/backfill-test.sh b/ci/scripts/backfill-test.sh index 039e8bee94865..1a4ed37fb9d7f 100755 --- a/ci/scripts/backfill-test.sh +++ b/ci/scripts/backfill-test.sh @@ -30,12 +30,9 @@ git config --global --add safe.directory /risingwave download_and_prepare_rw "$profile" common -echo "--- e2e, ci-backfill, build" -cargo make ci-start ci-backfill - ################ TESTS -echo "--- e2e, ci-backfill, run backfill test" +echo "--- Run backfill tests" ./ci/scripts/run-backfill-tests.sh echo "--- Kill cluster" diff --git a/ci/scripts/run-backfill-tests.sh b/ci/scripts/run-backfill-tests.sh index 77a6ef1a5510c..cf00dfe3dd0a9 100755 --- a/ci/scripts/run-backfill-tests.sh +++ b/ci/scripts/run-backfill-tests.sh @@ -16,6 +16,7 @@ set -euo pipefail PARENT_PATH=$(dirname "${BASH_SOURCE[0]}") +TEST_DIR=$PWD/e2e_test run_sql_file() { psql -h localhost -p 4566 -d dev -U root -f "$@" @@ -29,15 +30,99 @@ flush() { run_sql "FLUSH;" } -run_sql_file "$PARENT_PATH"/sql/backfill/create_base_table.sql +# Test snapshot and upstream read. +test_snapshot_and_upstream_read() { + echo "--- e2e, ci-backfill, test_snapshot_and_upstream_read" + cargo make ci-start ci-backfill -# Provide snapshot -run_sql_file "$PARENT_PATH"/sql/backfill/insert.sql -run_sql_file "$PARENT_PATH"/sql/backfill/insert.sql & -run_sql_file "$PARENT_PATH"/sql/backfill/create_mv.sql & + run_sql_file "$PARENT_PATH"/sql/backfill/create_base_table.sql -wait + # Provide snapshot + run_sql_file "$PARENT_PATH"/sql/backfill/insert.sql -run_sql_file "$PARENT_PATH"/sql/backfill/select.sql