-
Notifications
You must be signed in to change notification settings - Fork 589
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
260 additions
and
24 deletions.
There are no files selected for viewing
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,75 @@ | ||
system ok | ||
python3 e2e_test/udf/test.py & | ||
|
||
# wait for server to start | ||
sleep 10s | ||
|
||
statement ok | ||
CREATE FUNCTION sleep_always_retry(INT) RETURNS INT AS 'sleep' USING LINK 'http://localhost:8815' WITH ( always_retry_on_network_error = true ); | ||
|
||
statement ok | ||
CREATE FUNCTION sleep_no_retry(INT) RETURNS INT AS 'sleep' USING LINK 'http://localhost:8815'; | ||
|
||
# Create a table with 30 records | ||
statement ok | ||
CREATE TABLE t (v1 int); | ||
|
||
statement ok | ||
INSERT INTO t select 0 from generate_series(1, 30); | ||
|
||
statement ok | ||
flush; | ||
|
||
statement ok | ||
SET STREAMING_RATE_LIMIT=1; | ||
|
||
statement ok | ||
SET BACKGROUND_DDL=true; | ||
|
||
statement ok | ||
CREATE MATERIALIZED VIEW mv_no_retry AS SELECT sleep_no_retry(v1) as s1 from t; | ||
|
||
# Create a Materialized View | ||
statement ok | ||
CREATE MATERIALIZED VIEW mv_always_retry AS SELECT sleep_always_retry(v1) as s1 from t; | ||
|
||
# Immediately kill the server, sleep for 1minute. | ||
system ok | ||
pkill -9 -i python && sleep 60 | ||
|
||
# Restart the server | ||
system ok | ||
python3 e2e_test/udf/test.py & | ||
|
||
# Wait for materialized view to be complete | ||
statement ok | ||
wait; | ||
|
||
query I | ||
SELECT count(*) FROM mv_always_retry where s1 is NULL; | ||
---- | ||
0 | ||
|
||
query B | ||
SELECT count(*) > 0 FROM mv_no_retry where s1 is NULL; | ||
---- | ||
t | ||
|
||
statement ok | ||
SET STREAMING_RATE_LIMIT=0; | ||
|
||
statement ok | ||
SET BACKGROUND_DDL=false; | ||
|
||
# close the server | ||
system ok | ||
pkill -i python | ||
|
||
statement ok | ||
DROP FUNCTION sleep_always_retry; | ||
|
||
statement ok | ||
DROP FUNCTION sleep_no_retry; | ||
|
||
statement ok | ||
DROP TABLE t CASCADE; |
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
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
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
Oops, something went wrong.