diff --git a/tests/script/general/parser/limit1_tblocks100.sim b/tests/script/general/parser/limit1_tblocks100.sim index 99ffd31f6d..2235e6b424 100644 --- a/tests/script/general/parser/limit1_tblocks100.sim +++ b/tests/script/general/parser/limit1_tblocks100.sim @@ -61,11 +61,10 @@ run general/parser/limit1_stb.sim print ================== restart server to commit data into disk system sh/exec.sh -n dnode1 -s stop -x SIGINT -sleep 5000 system sh/exec.sh -n dnode1 -s start print ================== server restart completed run general/parser/limit1_tb.sim run general/parser/limit1_stb.sim -system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file +system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/script/sh/exec.sh b/tests/script/sh/exec.sh index 1e033071f7..6928039be1 100755 --- a/tests/script/sh/exec.sh +++ b/tests/script/sh/exec.sh @@ -97,13 +97,17 @@ else #relative path RCFG_DIR=sim/$NODE_NAME/cfg PID=`ps -ef|grep taosd | grep $RCFG_DIR | grep -v grep | awk '{print $2}'` - if [ -n "$PID" ]; then + while [ -n "$PID" ] + do if [ "$SIGNAL" = "SIGINT" ]; then - echo killed by signal + echo try to kill by signal SIGINT kill -SIGINT $PID else + echo try to kill by signal SIGKILL kill -9 $PID fi - fi + sleep 1 + PID=`ps -ef|grep taosd | grep $RCFG_DIR | grep -v grep | awk '{print $2}'` + done fi