From 6c6b0055fb449d451f03b92a3e73e33a9d5e311e Mon Sep 17 00:00:00 2001 From: plum-lihui Date: Tue, 26 Apr 2022 19:57:54 +0800 Subject: [PATCH] [test: add test case] --- tests/script/jenkins/basic.txt | 1 + tests/script/tsim/db/taosdlog.sim | 31 +++++++++++++++++++++++++++++++ tests/system-test/fulltest.sh | 2 -- 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 tests/script/tsim/db/taosdlog.sim diff --git a/tests/script/jenkins/basic.txt b/tests/script/jenkins/basic.txt index 6ec6d15028..72ff6179db 100644 --- a/tests/script/jenkins/basic.txt +++ b/tests/script/jenkins/basic.txt @@ -13,6 +13,7 @@ ./test.sh -f tsim/db/basic6.sim ./test.sh -f tsim/db/basic7.sim ./test.sh -f tsim/db/error1.sim +./test.sh -f tsim/db/taosdlog.sim # ---- dnode ./test.sh -f tsim/dnode/basic1.sim diff --git a/tests/script/tsim/db/taosdlog.sim b/tests/script/tsim/db/taosdlog.sim new file mode 100644 index 0000000000..c0a0c2b519 --- /dev/null +++ b/tests/script/tsim/db/taosdlog.sim @@ -0,0 +1,31 @@ +system sh/stop_dnodes.sh +system sh/deploy.sh -n dnode1 -i 1 + +system rm -rf ../../sim/dnode1/log + +system sh/exec.sh -n dnode1 -s start +sql connect + +print =============== create database +sql create database d1 vgroups 2 +sql show databases +if $rows != 3 then + return -1 +endi + +print =============== restart + +system sh/exec.sh -n dnode1 -s stop -x SIGKILL +sleep 2000 +system rm -rf ../../sim/dnode1/log +system sh/exec.sh -n dnode1 -s start +sleep 2000 + +print =============== show databases +sql create database d2 vgroups 6 +sql show databases +if $rows != 4 then + return -1 +endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/system-test/fulltest.sh b/tests/system-test/fulltest.sh index 522fe36cd5..30477722ab 100755 --- a/tests/system-test/fulltest.sh +++ b/tests/system-test/fulltest.sh @@ -1,8 +1,6 @@ #!/bin/bash set -e -python3 ./test.py -f 0-others/taosdlog.py - #python3 ./test.py -f 2-query/between.py #python3 ./test.py -f 2-query/distinct.py python3 ./test.py -f 2-query/varchar.py