diff --git a/tests/script/general/parser/limit1_tblocks100.sim b/tests/script/general/parser/limit1_tblocks100.sim index 99ffd31f6dbb405876c9a00b5d903469ab445a20..2235e6b424f4f3e5fd5edbc496046bb400908b34 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 1e033071f7610cd11d2c9ac69cb272a52d181300..6928039be11642b82e9a50d2f32a38d442abfbce 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