forked from risingwavelabs/risingwave
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(connector): introduce inline e2e test for CDC table schema change (
risingwavelabs#12344) Signed-off-by: Bugen Zhao <[email protected]>
- Loading branch information
Showing
9 changed files
with
127 additions
and
15 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,7 +42,7 @@ ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse | |
RUN curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash | ||
RUN cargo binstall -y --no-symlinks cargo-llvm-cov cargo-nextest cargo-hakari cargo-sort cargo-cache cargo-audit \ | ||
[email protected] \ | ||
sqllogictest-bin@0.15.3 \ | ||
sqllogictest-bin@0.17.0 \ | ||
&& cargo install sccache \ | ||
&& cargo cache -a \ | ||
&& rm -rf "/root/.cargo/registry/index" \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
control substitution on | ||
|
||
system ok | ||
psql -c " | ||
CREATE TABLE alter_test (k BIGINT PRIMARY KEY, v CHARACTER VARYING); | ||
INSERT INTO alter_test VALUES (1, 'a'), (2, 'b'); | ||
" | ||
|
||
statement ok | ||
CREATE TABLE alter_test (k BIGINT PRIMARY KEY, v CHARACTER VARYING) | ||
WITH ( | ||
connector = 'postgres-cdc', | ||
hostname = '${PGHOST:localhost}', | ||
port = '${PGPORT:5432}', | ||
username = '${PGUSER:$USER}', | ||
password = '${PGPASSWORD:}', | ||
database.name = '${PGDATABASE:postgres}', | ||
schema.name = 'public', | ||
table.name = 'alter_test', | ||
slot.name = 'alter_test' | ||
) | ||
|
||
sleep 5s | ||
|
||
query IT | ||
SELECT * FROM alter_test ORDER BY k | ||
---- | ||
1 a | ||
2 b | ||
|
||
statement ok | ||
ALTER TABLE alter_test ADD COLUMN v2 CHARACTER VARYING | ||
|
||
system ok | ||
psql -c " | ||
INSERT INTO alter_test VALUES (3, 'c'); | ||
" | ||
|
||
# FIXME: after schema change in RisingWave, why does it take so long to get the new data? | ||
sleep 20s | ||
|
||
query ITT | ||
SELECT * FROM alter_test ORDER BY k | ||
---- | ||
1 a NULL | ||
2 b NULL | ||
3 c NULL | ||
|
||
system ok | ||
psql -c " | ||
ALTER TABLE alter_test ADD COLUMN v2 CHARACTER VARYING; | ||
INSERT INTO alter_test VALUES (4, 'd', 'dd'); | ||
" | ||
|
||
sleep 5s | ||
|
||
query ITT | ||
SELECT * FROM alter_test ORDER BY k | ||
---- | ||
1 a NULL | ||
2 b NULL | ||
3 c NULL | ||
4 d dd | ||
|
||
statement ok | ||
ALTER TABLE alter_test DROP COLUMN v | ||
|
||
system ok | ||
psql -c " | ||
ALTER TABLE alter_test DROP COLUMN v; | ||
INSERT INTO alter_test VALUES (5, 'ee'); | ||
" | ||
|
||
# FIXME: after schema change in RisingWave, why does it take so long to get the new data? | ||
sleep 20s | ||
|
||
query IT | ||
SELECT * FROM alter_test ORDER BY k | ||
---- | ||
1 NULL | ||
2 NULL | ||
3 NULL | ||
4 dd | ||
5 ee | ||
|
||
statement ok | ||
DROP TABLE alter_test | ||
|
||
system ok | ||
psql -c " | ||
DROP TABLE alter_test; | ||
" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters