diff --git a/e2e_test/ddl/drop/drop_creating_mv.slt b/e2e_test/ddl/drop/drop_creating_mv.slt new file mode 100644 index 0000000000000..114045f92ce09 --- /dev/null +++ b/e2e_test/ddl/drop/drop_creating_mv.slt @@ -0,0 +1,41 @@ +statement ok +create table t(v1 int); + +statement ok +insert into t select * from generate_series(1, 10000); + +statement ok +flush; + +statement ok +set streaming_rate_limit=1; + +# Test drop foreground mv +skipif madsim +system ok +risedev psql -c 'create materialized view m1 as select * from t;' & + +skipif madsim +sleep 5s + +skipif madsim +statement ok +drop materialized view m1; + +# Test drop background mv +statement ok +set background_ddl=true; + +skipif madsim +statement ok +create materialized view m1 as select * from t; + +skipif madsim +sleep 5s + +skipif madsim +statement ok +drop materialized view m1; + +statement ok +drop table t; \ No newline at end of file