Skip to content

Commit

Permalink
refine e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
StrikeW committed Dec 27, 2023
1 parent f1fef67 commit bdc87a1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 36 deletions.
5 changes: 3 additions & 2 deletions ci/scripts/e2e-source-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@ sqllogictest -p 4566 -d dev './e2e_test/source/cdc/cdc.check.slt'

# kill cluster
cargo make kill
echo "cluster killed "
echo "> cluster killed "

echo "--- mysql & postgres recovery check"
# insert into mytest database (cdc.share_stream.slt)
mysql --protocol=tcp -u root mytest -e "INSERT INTO products
VALUES (default,'RisingWave','Next generation Streaming Database'),
Expand All @@ -95,7 +96,7 @@ export RUST_LOG="events::stream::message::chunk=trace,risingwave_stream=debug,ri

cargo make dev ci-1cn-1fe-with-recovery
echo "> wait for cluster recovery finish"
sleep 25
sleep 20
echo "> check mviews after cluster recovery"
# check results
sqllogictest -p 4566 -d dev './e2e_test/source/cdc/cdc.check_new_rows.slt'
Expand Down
6 changes: 0 additions & 6 deletions e2e_test/source/cdc/cdc.check.slt
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,6 @@ select count(*) from t1_rw;
----
1

# 3 inserted in cdc.share_stream.slt and 3 inserted in postgres_cdc.sql
query I
select count(*) from person_rw;
----
6

query I
select count(*) from tt3_rw;
----
Expand Down
12 changes: 6 additions & 6 deletions e2e_test/source/cdc/cdc.check_new_rows.slt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ select cnt from shipments_cnt;
4

query ITTTT
select * from person_rw order by id;
select * from person_new order by id;
----
1000 vicky noris [email protected] 7878 5821 1864 2539 cheyenne
1001 peter white [email protected] 1781 2313 8157 6974 boise
Expand All @@ -26,6 +26,11 @@ select * from person_rw order by id;
1101 white [email protected] 8157 6974 se
1102 spencer [email protected] 9481 6270 angeles

# 2 rows inserted after cluster is stopped
query I
SELECT * from person_new_cnt
----
8

query ITTTTT
select order_id,order_date,customer_name,product_id,order_status from orders order by order_id;
Expand Down Expand Up @@ -69,8 +74,3 @@ SELECT * FROM products_test order by id limit 3
102 RW 12V car battery
103 RW 12-pack of drill bits with sizes ranging from #40 to #3

# 2 rows inserted after cluster is stopped
query I
SELECT * from person_new_cnt
----
8
22 changes: 0 additions & 22 deletions e2e_test/source/cdc/cdc.load.slt
Original file line number Diff line number Diff line change
Expand Up @@ -176,25 +176,6 @@ create table t1_rw (
publication.create.enable='false'
);

statement ok
create table person_rw (
id int primary key,
name varchar,
email_address varchar,
credit_card varchar,
city varchar
) with (
connector = 'postgres-cdc',
hostname = 'db',
port = '5432',
username = 'postgres',
password='postgres',
database.name='cdc_test',
table.name='person',
publication.name='my_publicaton',
publication.create.enable='false'
);

statement error
create table person_rw (
id int primary key,
Expand All @@ -211,6 +192,3 @@ create table person_rw (
publication.name='dumb_publicaton',
publication.create.enable='false'
);

statement ok
create materialized view person_cnt as select count(*) as cnt from person_rw;

0 comments on commit bdc87a1

Please sign in to comment.