From 2d6488926d9f0d66f223ef46087c224d449f1b23 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Thu, 22 Sep 2022 16:55:04 +0800 Subject: [PATCH] test: case for drop topic --- tests/script/tsim/tmq/topic.sim | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/tests/script/tsim/tmq/topic.sim b/tests/script/tsim/tmq/topic.sim index 602b106472..cb1e74798e 100644 --- a/tests/script/tsim/tmq/topic.sim +++ b/tests/script/tsim/tmq/topic.sim @@ -72,15 +72,31 @@ sql create topic topic_ntb_column as select ts, c3 from ntb0 sql create topic topic_ntb_all as select * from ntb0 sql create topic topic_ntb_function as select ts, abs(c1), sin(c2) from ntb0 +system sh/exec.sh -n dnode1 -s stop -x SIGINT +system sh/exec.sh -n dnode1 -s start -print == show topics sql show topics if $rows != 9 then return -1 endi -print == drop topic sql drop topic topic_stb_column + +sql show topics +if $rows != 8 then + return -1 +endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT +system sh/exec.sh -n dnode1 -s start + +print == show topics +sql show topics +if $rows != 8 then + return -1 +endi + +print == drop topic sql drop topic topic_ctb_column sql drop topic topic_ntb_column @@ -90,4 +106,4 @@ if $rows != 6 then return -1 endi - +system sh/exec.sh -n dnode1 -s stop -x SIGINT