From 1260d4097673a56d624e0b2499e7a84d08aa2701 Mon Sep 17 00:00:00 2001 From: slguan Date: Wed, 22 Apr 2020 12:17:32 +0800 Subject: [PATCH] script --- tests/script/unique/dnode/balance1.sim | 112 ++++++++++---------- tests/script/unique/dnode/balance2.sim | 110 +++++++++---------- tests/script/unique/dnode/balance3.sim | 122 +++++++++++----------- tests/script/unique/dnode/balancex.sim | 52 ++++----- tests/script/unique/dnode/monitor_bug.sim | 16 +-- tests/script/unique/dnode/offline1.sim | 6 +- tests/script/unique/dnode/offline2.sim | 8 +- tests/script/unique/dnode/remove1.sim | 50 ++++----- tests/script/unique/dnode/remove2.sim | 36 +++---- tests/script/unique/dnode/vnode_clean.sim | 92 ++++++++-------- 10 files changed, 302 insertions(+), 302 deletions(-) diff --git a/tests/script/unique/dnode/balance1.sim b/tests/script/unique/dnode/balance1.sim index b7da8cb9ca..413d4d74b3 100644 --- a/tests/script/unique/dnode/balance1.sim +++ b/tests/script/unique/dnode/balance1.sim @@ -36,7 +36,7 @@ system sh/cfg.sh -n dnode3 -c clog -v 1 system sh/cfg.sh -n dnode4 -c clog -v 1 print ========== step1 -system sh/exec.sh -n dnode1 -s start +system sh/exec_up.sh -n dnode1 -s start sql connect sleep 3000 @@ -49,15 +49,15 @@ sql insert into d1.t1 values(now+4s, 12) sql insert into d1.t1 values(now+5s, 11) sql show dnodes -print 192.168.0.1 freeVnodes $data3_192.168.0.1 -if $data3_192.168.0.1 != 3 then +print 192.168.0.1 openVnodes $data3_1 +if $data3_1 != 1 then return -1 endi print ========== step2 sleep 2000 sql create dnode 192.168.0.2 -system sh/exec.sh -n dnode2 -s start +system sh/exec_up.sh -n dnode2 -s start $x = 0 show2: @@ -68,12 +68,12 @@ show2: endi sql show dnodes -print 192.168.0.1 freeVnodes $data3_192.168.0.1 -print 192.168.0.2 freeVnodes $data3_192.168.0.2 -if $data3_192.168.0.1 != 4 then +print 192.168.0.1 openVnodes $data3_1 +print 192.168.0.2 openVnodes $data3_2 +if $data3_1 != 0 then goto show2 endi -if $data3_192.168.0.2 != 3 then +if $data3_2 != 1 then goto show2 endi @@ -87,12 +87,12 @@ sql insert into d2.t2 values(now+4s, 22) sql insert into d2.t2 values(now+5s, 21) sql show dnodes -print 192.168.0.1 freeVnodes $data3_192.168.0.1 -print 192.168.0.2 freeVnodes $data3_192.168.0.2 -if $data3_192.168.0.1 != 4 then +print 192.168.0.1 openVnodes $data3_1 +print 192.168.0.2 openVnodes $data3_2 +if $data3_1 != 0 then return -1 endi -if $data3_192.168.0.2 != 2 then +if $data3_2 != 2 then return -1 endi @@ -108,23 +108,23 @@ show4: endi sql show dnodes -print 192.168.0.1 freeVnodes $data3_192.168.0.1 -print 192.168.0.2 freeVnodes $data3_192.168.0.2 -if $data3_192.168.0.1 != 2 then +print 192.168.0.1 openVnodes $data3_1 +print 192.168.0.2 openVnodes $data3_2 +if $data3_1 != 2 then goto show4 endi -if $data3_192.168.0.2 != null then +if $data3_2 != null then goto show4 endi if $rows != 1 then goto show4 endi -system sh/exec.sh -n dnode2 -s stop -x SIGINT +system sh/exec_up.sh -n dnode2 -s stop -x SIGINT print ========== step5 sql create dnode 192.168.0.3 -system sh/exec.sh -n dnode3 -s start +system sh/exec_up.sh -n dnode3 -s start $x = 0 show5: @@ -135,16 +135,16 @@ show5: endi sql show dnodes -print 192.168.0.1 freeVnodes $data3_192.168.0.1 -print 192.168.0.2 freeVnodes $data3_192.168.0.2 -print 192.168.0.3 freeVnodes $data3_192.168.0.3 -if $data3_192.168.0.1 != 4 then +print 192.168.0.1 openVnodes $data3_1 +print 192.168.0.2 openVnodes $data3_2 +print 192.168.0.3 openVnodes $data3_3 +if $data3_1 != 0 then goto show5 endi -if $data3_192.168.0.2 != null then +if $data3_2 != null then goto show5 endi -if $data3_192.168.0.3 != 2 then +if $data3_3 != 2 then goto show5 endi @@ -158,23 +158,23 @@ sql insert into d3.t3 values(now+4s, 32) sql insert into d3.t3 values(now+5s, 31) sql show dnodes -print 192.168.0.1 freeVnodes $data3_192.168.0.1 -print 192.168.0.2 freeVnodes $data3_192.168.0.2 -print 192.168.0.3 freeVnodes $data3_192.168.0.3 +print 192.168.0.1 openVnodes $data3_1 +print 192.168.0.2 openVnodes $data3_2 +print 192.168.0.3 openVnodes $data3_3 -if $data3_192.168.0.1 != 4 then +if $data3_1 != 0 then return -1 endi -if $data3_192.168.0.2 != null then +if $data3_2 != null then return -1 endi -if $data3_192.168.0.3 != 1 then +if $data3_3 != 3 then return -1 endi print ========== step7 sql create dnode 192.168.0.4 -system sh/exec.sh -n dnode4 -s start +system sh/exec_up.sh -n dnode4 -s start $x = 0 show7: @@ -185,20 +185,20 @@ show7: endi sql show dnodes -print 192.168.0.1 freeVnodes $data3_192.168.0.1 -print 192.168.0.2 freeVnodes $data3_192.168.0.2 -print 192.168.0.3 freeVnodes $data3_192.168.0.3 -print 192.168.0.4 freeVnodes $data3_192.168.0.4 -if $data3_192.168.0.1 != 4 then +print 192.168.0.1 openVnodes $data3_1 +print 192.168.0.2 openVnodes $data3_2 +print 192.168.0.3 openVnodes $data3_3 +print 192.168.0.4 openVnodes $data3_4 +if $data3_1 != 0 then goto show7 endi -if $data3_192.168.0.2 != null then +if $data3_2 != null then goto show7 endi -if $data3_192.168.0.3 != 2 then +if $data3_3 != 2 then goto show7 endi -if $data3_192.168.0.4 != 3 then +if $data3_4 != 1 then goto show7 endi @@ -212,21 +212,21 @@ sql insert into d4.t4 values(now+4s, 42) sql insert into d4.t4 values(now+5s, 41) sql show dnodes -print 192.168.0.1 freeVnodes $data3_192.168.0.1 -print 192.168.0.2 freeVnodes $data3_192.168.0.2 -print 192.168.0.3 freeVnodes $data3_192.168.0.3 -print 192.168.0.4 freeVnodes $data3_192.168.0.4 +print 192.168.0.1 openVnodes $data3_1 +print 192.168.0.2 openVnodes $data3_2 +print 192.168.0.3 openVnodes $data3_3 +print 192.168.0.4 openVnodes $data3_4 -if $data3_192.168.0.1 != 4 then +if $data3_1 != 0 then return -1 endi -if $data3_192.168.0.2 != null then +if $data3_2 != null then return -1 endi -if $data3_192.168.0.3 != 2 then +if $data3_3 != 2 then return -1 endi -if $data3_192.168.0.4 != 2 then +if $data3_4 != 2 then return -1 endi @@ -242,25 +242,25 @@ show9: endi sql show dnodes -print 192.168.0.1 freeVnodes $data3_192.168.0.1 -print 192.168.0.2 freeVnodes $data3_192.168.0.2 -print 192.168.0.3 freeVnodes $data3_192.168.0.3 -print 192.168.0.4 freeVnodes $data3_192.168.0.4 +print 192.168.0.1 openVnodes $data3_1 +print 192.168.0.2 openVnodes $data3_2 +print 192.168.0.3 openVnodes $data3_3 +print 192.168.0.4 openVnodes $data3_4 -if $data3_192.168.0.1 != 4 then +if $data3_1 != 0 then goto show9 endi -if $data3_192.168.0.2 != null then +if $data3_2 != null then goto show9 endi -if $data3_192.168.0.3 != null then +if $data3_3 != null then goto show9 endi -if $data3_192.168.0.4 != 0 then +if $data3_4 != 4 then goto show9 endi -system sh/exec.sh -n dnode3 -s stop -x SIGINT +system sh/exec_up.sh -n dnode3 -s stop -x SIGINT print ========== step10 sql select * from d1.t1 order by t desc diff --git a/tests/script/unique/dnode/balance2.sim b/tests/script/unique/dnode/balance2.sim index afe82f8cdd..5e887d54f5 100644 --- a/tests/script/unique/dnode/balance2.sim +++ b/tests/script/unique/dnode/balance2.sim @@ -37,13 +37,13 @@ system sh/cfg.sh -n dnode4 -c clog -v 1 system sh/cfg.sh -n dnode5 -c clog -v 1 print ========== step1 -system sh/exec.sh -n dnode1 -s start +system sh/exec_up.sh -n dnode1 -s start sql connect sql create dnode 192.168.0.2 sql create dnode 192.168.0.3 -system sh/exec.sh -n dnode2 -s start -system sh/exec.sh -n dnode3 -s start +system sh/exec_up.sh -n dnode2 -s start +system sh/exec_up.sh -n dnode3 -s start sleep 3000 sql create database d1 replica 2 tables 4 @@ -63,16 +63,16 @@ sql insert into d2.t2 values(now+4s, 22) sql insert into d2.t2 values(now+5s, 21) sql show dnodes -print 192.168.0.1 freeVnodes $data3_192.168.0.1 -print 192.168.0.2 freeVnodes $data3_192.168.0.2 -print 192.168.0.3 freeVnodes $data3_192.168.0.3 -if $data3_192.168.0.1 != 4 then +print 192.168.0.1 openVnodes $data3_1 +print 192.168.0.2 openVnodes $data3_2 +print 192.168.0.3 openVnodes $data3_3 +if $data3_1 != 4 then return -1 endi -if $data3_192.168.0.2 != 2 then +if $data3_2 != 2 then return -1 endi -if $data3_192.168.0.3 != 2 then +if $data3_3 != 2 then return -1 endi @@ -88,24 +88,24 @@ show2: endi sql show dnodes -print 192.168.0.1 freeVnodes $data3_192.168.0.1 -print 192.168.0.2 freeVnodes $data3_192.168.0.2 -print 192.168.0.3 freeVnodes $data3_192.168.0.3 -if $data3_192.168.0.1 != 2 then +print 192.168.0.1 openVnodes $data3_1 +print 192.168.0.2 openVnodes $data3_2 +print 192.168.0.3 openVnodes $data3_3 +if $data3_1 != 2 then goto show2 endi -if $data3_192.168.0.2 != null then +if $data3_2 != null then goto show2 endi -if $data3_192.168.0.3 != 2 then +if $data3_3 != 2 then goto show2 endi -system sh/exec.sh -n dnode2 -s stop -x SIGINT +system sh/exec_up.sh -n dnode2 -s stop -x SIGINT print ========== step3 sql create dnode 192.168.0.4 -system sh/exec.sh -n dnode4 -s start +system sh/exec_up.sh -n dnode4 -s start $x = 0 show3: @@ -116,20 +116,20 @@ show3: endi sql show dnodes -print 192.168.0.1 freeVnodes $data3_192.168.0.1 -print 192.168.0.2 freeVnodes $data3_192.168.0.2 -print 192.168.0.3 freeVnodes $data3_192.168.0.3 -print 192.168.0.4 freeVnodes $data3_192.168.0.4 -if $data3_192.168.0.1 != 4 then +print 192.168.0.1 openVnodes $data3_1 +print 192.168.0.2 openVnodes $data3_2 +print 192.168.0.3 openVnodes $data3_3 +print 192.168.0.4 openVnodes $data3_4 +if $data3_1 != 4 then goto show3 endi -if $data3_192.168.0.2 != null then +if $data3_2 != null then goto show3 endi -if $data3_192.168.0.3 != 2 then +if $data3_3 != 2 then goto show3 endi -if $data3_192.168.0.4 != 2 then +if $data3_4 != 2 then goto show3 endi @@ -143,26 +143,26 @@ sql insert into d3.t3 values(now+4s, 32) sql insert into d3.t3 values(now+5s, 31) sql show dnodes -print 192.168.0.1 freeVnodes $data3_192.168.0.1 -print 192.168.0.2 freeVnodes $data3_192.168.0.2 -print 192.168.0.3 freeVnodes $data3_192.168.0.3 -print 192.168.0.4 freeVnodes $data3_192.168.0.4 -if $data3_192.168.0.1 != 4 then +print 192.168.0.1 openVnodes $data3_1 +print 192.168.0.2 openVnodes $data3_2 +print 192.168.0.3 openVnodes $data3_3 +print 192.168.0.4 openVnodes $data3_4 +if $data3_1 != 4 then return -1 endi -if $data3_192.168.0.2 != null then +if $data3_2 != null then return -1 endi -if $data3_192.168.0.3 != 1 then +if $data3_3 != 1 then return -1 endi -if $data3_192.168.0.4 != 1 then +if $data3_4 != 1 then return -1 endi print ========== step5 sql create dnode 192.168.0.5 -system sh/exec.sh -n dnode5 -s start +system sh/exec_up.sh -n dnode5 -s start $x = 0 show5: @@ -173,24 +173,24 @@ show5: endi sql show dnodes -print 192.168.0.1 freeVnodes $data3_192.168.0.1 -print 192.168.0.2 freeVnodes $data3_192.168.0.2 -print 192.168.0.3 freeVnodes $data3_192.168.0.3 -print 192.168.0.4 freeVnodes $data3_192.168.0.4 -print 192.168.0.5 freeVnodes $data3_192.168.0.5 -if $data3_192.168.0.1 != 4 then +print 192.168.0.1 openVnodes $data3_1 +print 192.168.0.2 openVnodes $data3_2 +print 192.168.0.3 openVnodes $data3_3 +print 192.168.0.4 openVnodes $data3_4 +print 192.168.0.5 openVnodes $data3_5 +if $data3_1 != 4 then goto show5 endi -if $data3_192.168.0.2 != null then +if $data3_2 != null then goto show5 endi -if $data3_192.168.0.3 != 2 then +if $data3_3 != 2 then goto show5 endi -if $data3_192.168.0.4 != 2 then +if $data3_4 != 2 then goto show5 endi -if $data3_192.168.0.5 != 2 then +if $data3_5 != 2 then goto show5 endi @@ -206,28 +206,28 @@ show6: endi sql show dnodes -print 192.168.0.1 freeVnodes $data3_192.168.0.1 -print 192.168.0.2 freeVnodes $data3_192.168.0.2 -print 192.168.0.3 freeVnodes $data3_192.168.0.3 -print 192.168.0.4 freeVnodes $data3_192.168.0.4 -print 192.168.0.5 freeVnodes $data3_192.168.0.5 -if $data3_192.168.0.1 != 4 then +print 192.168.0.1 openVnodes $data3_1 +print 192.168.0.2 openVnodes $data3_2 +print 192.168.0.3 openVnodes $data3_3 +print 192.168.0.4 openVnodes $data3_4 +print 192.168.0.5 openVnodes $data3_5 +if $data3_1 != 4 then goto show6 endi -if $data3_192.168.0.2 != null then +if $data3_2 != null then goto show6 endi -if $data3_192.168.0.3 != null then +if $data3_3 != null then goto show6 endi -if $data3_192.168.0.4 != 1 then +if $data3_4 != 1 then goto show6 endi -if $data3_192.168.0.5 != 1 then +if $data3_5 != 1 then goto show6 endi -system sh/exec.sh -n dnode3 -s stop -x SIGINT +system sh/exec_up.sh -n dnode3 -s stop -x SIGINT print ========== step7 sql select * from d1.t1 order by t desc diff --git a/tests/script/unique/dnode/balance3.sim b/tests/script/unique/dnode/balance3.sim index fc46736ef8..7baa6444ee 100644 --- a/tests/script/unique/dnode/balance3.sim +++ b/tests/script/unique/dnode/balance3.sim @@ -43,15 +43,15 @@ system sh/cfg.sh -n dnode5 -c clog -v 1 system sh/cfg.sh -n dnode6 -c clog -v 1 print ========== step1 -system sh/exec.sh -n dnode1 -s start +system sh/exec_up.sh -n dnode1 -s start sql connect sql create dnode 192.168.0.2 sql create dnode 192.168.0.3 sql create dnode 192.168.0.4 -system sh/exec.sh -n dnode2 -s start -system sh/exec.sh -n dnode3 -s start -system sh/exec.sh -n dnode4 -s start +system sh/exec_up.sh -n dnode2 -s start +system sh/exec_up.sh -n dnode3 -s start +system sh/exec_up.sh -n dnode4 -s start sleep 3000 sql create database d1 replica 3 tables 4 @@ -71,21 +71,21 @@ sql insert into d2.t2 values(now+4s, 22) sql insert into d2.t2 values(now+5s, 21) sql show dnodes -print 192.168.0.1 freeVnodes $data3_192.168.0.1 -print 192.168.0.2 freeVnodes $data3_192.168.0.2 -print 192.168.0.3 freeVnodes $data3_192.168.0.3 -print 192.168.0.4 freeVnodes $data3_192.168.0.4 +print 192.168.0.1 openVnodes $data3_1 +print 192.168.0.2 openVnodes $data3_2 +print 192.168.0.3 openVnodes $data3_3 +print 192.168.0.4 openVnodes $data3_4 -if $data3_192.168.0.1 != 4 then +if $data3_1 != 4 then return -1 endi -if $data3_192.168.0.2 != 2 then +if $data3_2 != 2 then return -1 endi -if $data3_192.168.0.3 != 2 then +if $data3_3 != 2 then return -1 endi -if $data3_192.168.0.4 != 2 then +if $data3_4 != 2 then return -1 endi @@ -101,29 +101,29 @@ show2: endi sql show dnodes -print 192.168.0.1 freeVnodes $data3_192.168.0.1 -print 192.168.0.2 freeVnodes $data3_192.168.0.2 -print 192.168.0.3 freeVnodes $data3_192.168.0.3 -print 192.168.0.4 freeVnodes $data3_192.168.0.4 +print 192.168.0.1 openVnodes $data3_1 +print 192.168.0.2 openVnodes $data3_2 +print 192.168.0.3 openVnodes $data3_3 +print 192.168.0.4 openVnodes $data3_4 -if $data3_192.168.0.1 != 2 then +if $data3_1 != 2 then goto show2 endi -if $data3_192.168.0.2 != null then +if $data3_2 != null then goto show2 endi -if $data3_192.168.0.3 != 2 then +if $data3_3 != 2 then goto show2 endi -if $data3_192.168.0.4 != 2 then +if $data3_4 != 2 then goto show2 endi -system sh/exec.sh -n dnode2 -s stop -x SIGINT +system sh/exec_up.sh -n dnode2 -s stop -x SIGINT print ========== step sql create dnode 192.168.0.5 -system sh/exec.sh -n dnode5 -s start +system sh/exec_up.sh -n dnode5 -s start $x = 0 show3: @@ -134,25 +134,25 @@ show3: endi sql show dnodes -print 192.168.0.1 freeVnodes $data3_192.168.0.1 -print 192.168.0.2 freeVnodes $data3_192.168.0.2 -print 192.168.0.3 freeVnodes $data3_192.168.0.3 -print 192.168.0.4 freeVnodes $data3_192.168.0.4 -print 192.168.0.5 freeVnodes $data3_192.168.0.5 +print 192.168.0.1 openVnodes $data3_1 +print 192.168.0.2 openVnodes $data3_2 +print 192.168.0.3 openVnodes $data3_3 +print 192.168.0.4 openVnodes $data3_4 +print 192.168.0.5 openVnodes $data3_5 -if $data3_192.168.0.1 != 4 then +if $data3_1 != 4 then goto show3 endi -if $data3_192.168.0.2 != null then +if $data3_2 != null then goto show3 endi -if $data3_192.168.0.3 != 2 then +if $data3_3 != 2 then goto show3 endi -if $data3_192.168.0.4 != 2 then +if $data3_4 != 2 then goto show3 endi -if $data3_192.168.0.5 != 2 then +if $data3_5 != 2 then goto show3 endi @@ -174,31 +174,31 @@ show4: endi sql show dnodes -print 192.168.0.1 freeVnodes $data3_192.168.0.1 -print 192.168.0.2 freeVnodes $data3_192.168.0.2 -print 192.168.0.3 freeVnodes $data3_192.168.0.3 -print 192.168.0.4 freeVnodes $data3_192.168.0.4 -print 192.168.0.5 freeVnodes $data3_192.168.0.5 +print 192.168.0.1 openVnodes $data3_1 +print 192.168.0.2 openVnodes $data3_2 +print 192.168.0.3 openVnodes $data3_3 +print 192.168.0.4 openVnodes $data3_4 +print 192.168.0.5 openVnodes $data3_5 -if $data3_192.168.0.1 != 4 then +if $data3_1 != 4 then goto show4 endi -if $data3_192.168.0.2 != null then +if $data3_2 != null then goto show4 endi -if $data3_192.168.0.3 != 1 then +if $data3_3 != 1 then goto show4 endi -if $data3_192.168.0.4 != 1 then +if $data3_4 != 1 then goto show4 endi -if $data3_192.168.0.5 != 1 then +if $data3_5 != 1 then goto show4 endi print ========== step5 sql create dnode 192.168.0.2 -system sh/exec.sh -n dnode2 -s start +system sh/exec_up.sh -n dnode2 -s start $x = 0 show5: @@ -209,16 +209,16 @@ show5: endi sql show dnodes -print 192.168.0.1 freeVnodes $data3_192.168.0.1 -print 192.168.0.2 freeVnodes $data3_192.168.0.2 -print 192.168.0.3 freeVnodes $data3_192.168.0.3 -print 192.168.0.4 freeVnodes $data3_192.168.0.4 -print 192.168.0.5 freeVnodes $data3_192.168.0.5 +print 192.168.0.1 openVnodes $data3_1 +print 192.168.0.2 openVnodes $data3_2 +print 192.168.0.3 openVnodes $data3_3 +print 192.168.0.4 openVnodes $data3_4 +print 192.168.0.5 openVnodes $data3_5 -if $data3_192.168.0.1 != 4 then +if $data3_1 != 4 then goto show5 endi -if $data3_192.168.0.2 != 2 then +if $data3_2 != 2 then goto show5 endi @@ -236,29 +236,29 @@ show6: endi sql show dnodes -print 192.168.0.1 freeVnodes $data3_192.168.0.1 -print 192.168.0.2 freeVnodes $data3_192.168.0.2 -print 192.168.0.3 freeVnodes $data3_192.168.0.3 -print 192.168.0.4 freeVnodes $data3_192.168.0.4 -print 192.168.0.5 freeVnodes $data3_192.168.0.5 +print 192.168.0.1 openVnodes $data3_1 +print 192.168.0.2 openVnodes $data3_2 +print 192.168.0.3 openVnodes $data3_3 +print 192.168.0.4 openVnodes $data3_4 +print 192.168.0.5 openVnodes $data3_5 -if $data3_192.168.0.1 != 4 then +if $data3_1 != 4 then goto show6 endi -if $data3_192.168.0.2 != 1 then +if $data3_2 != 1 then goto show6 endi -if $data3_192.168.0.3 != null then +if $data3_3 != null then goto show6 endi -if $data3_192.168.0.4 != 1 then +if $data3_4 != 1 then goto show6 endi -if $data3_192.168.0.5 != 1 then +if $data3_5 != 1 then goto show6 endi -system sh/exec.sh -n dnode3 -s stop -x SIGINT +system sh/exec_up.sh -n dnode3 -s stop -x SIGINT print ========== step7 sql select * from d1.t1 order by t desc diff --git a/tests/script/unique/dnode/balancex.sim b/tests/script/unique/dnode/balancex.sim index 9e90ebf5d4..9153224a22 100644 --- a/tests/script/unique/dnode/balancex.sim +++ b/tests/script/unique/dnode/balancex.sim @@ -31,7 +31,7 @@ system sh/cfg.sh -n dnode3 -c clog -v 1 system sh/cfg.sh -n dnode4 -c clog -v 1 print ========== step1 -system sh/exec.sh -n dnode1 -s start +system sh/exec_up.sh -n dnode1 -s start sql connect sleep 3000 @@ -52,14 +52,14 @@ sql insert into d2.t2 values(now+4s, 22) sql insert into d2.t2 values(now+5s, 21) sql show dnodes -print 192.168.0.1 freeVnodes $data3_192.168.0.1 -if $data3_192.168.0.1 != 2 then +print 192.168.0.1 openVnodes $data3_1 +if $data3_1 != 2 then return -1 endi print ========== step2 sql create dnode 192.168.0.2 -system sh/exec.sh -n dnode2 -s start +system sh/exec_up.sh -n dnode2 -s start $x = 0 show2: @@ -70,12 +70,12 @@ show2: endi sql show dnodes -print 192.168.0.1 freeVnodes $data3_192.168.0.1 -print 192.168.0.2 freeVnodes $data3_192.168.0.2 -if $data3_192.168.0.1 != 4 then +print 192.168.0.1 openVnodes $data3_1 +print 192.168.0.2 openVnodes $data3_2 +if $data3_1 != 4 then goto show2 endi -if $data3_192.168.0.2 != 2 then +if $data3_2 != 2 then goto show2 endi @@ -96,18 +96,18 @@ show3: return -1 endi sql show dnodes -print 192.168.0.1 freeVnodes $data3_192.168.0.1 -print 192.168.0.2 freeVnodes $data3_192.168.0.2 -if $data3_192.168.0.1 != 3 then +print 192.168.0.1 openVnodes $data3_1 +print 192.168.0.2 openVnodes $data3_2 +if $data3_1 != 3 then goto show3 endi -if $data3_192.168.0.2 != 1 then +if $data3_2 != 1 then goto show3 endi print ========== step3 sql create dnode 192.168.0.3 -system sh/exec.sh -n dnode3 -s start +system sh/exec_up.sh -n dnode3 -s start $x = 0 show4: @@ -117,16 +117,16 @@ show4: return -1 endi sql show dnodes -print 192.168.0.1 freeVnodes $data3_192.168.0.1 -print 192.168.0.2 freeVnodes $data3_192.168.0.2 -print 192.168.0.3 freeVnodes $data3_192.168.0.3 -if $data3_192.168.0.1 != 4 then +print 192.168.0.1 openVnodes $data3_1 +print 192.168.0.2 openVnodes $data3_2 +print 192.168.0.3 openVnodes $data3_3 +if $data3_1 != 4 then goto show4 endi -if $data3_192.168.0.2 != 2 then +if $data3_2 != 2 then goto show4 endi -if $data3_192.168.0.3 != 2 then +if $data3_3 != 2 then goto show4 endi @@ -141,20 +141,20 @@ show5: return -1 endi sql show dnodes -print 192.168.0.1 freeVnodes $data3_192.168.0.1 -print 192.168.0.2 freeVnodes $data3_192.168.0.2 -print 192.168.0.3 freeVnodes $data3_192.168.0.3 -if $data3_192.168.0.1 != 3 then +print 192.168.0.1 openVnodes $data3_1 +print 192.168.0.2 openVnodes $data3_2 +print 192.168.0.3 openVnodes $data3_3 +if $data3_1 != 3 then goto show5 endi -if $data3_192.168.0.2 != null then +if $data3_2 != null then goto show5 endi -if $data3_192.168.0.3 != 1 then +if $data3_3 != 1 then goto show5 endi -system sh/exec.sh -n dnode2 -s stop -x SIGINT +system sh/exec_up.sh -n dnode2 -s stop -x SIGINT print ========== step6 sql select * from d1.t1 order by t desc diff --git a/tests/script/unique/dnode/monitor_bug.sim b/tests/script/unique/dnode/monitor_bug.sim index dd792bccbb..c95ddac43c 100644 --- a/tests/script/unique/dnode/monitor_bug.sim +++ b/tests/script/unique/dnode/monitor_bug.sim @@ -22,19 +22,19 @@ system sh/cfg.sh -n dnode1 -c monitor -v 1 system sh/cfg.sh -n dnode2 -c monitor -v 0 print ========== step1 -system sh/exec.sh -n dnode1 -s start +system sh/exec_up.sh -n dnode1 -s start sql connect sleep 5000 sql show dnodes -print 192.168.0.1 freeVnodes $data3_192.168.0.1 -if $data3_192.168.0.1 != 3 then +print 192.168.0.1 openVnodes $data3_1 +if $data3_1 != 3 then return -1 endi print ========== step2 sql create dnode 192.168.0.2 -system sh/exec.sh -n dnode2 -s start +system sh/exec_up.sh -n dnode2 -s start $x = 0 show2: @@ -45,12 +45,12 @@ show2: endi sql show dnodes -print 192.168.0.1 freeVnodes $data3_192.168.0.1 -print 192.168.0.2 freeVnodes $data3_192.168.0.2 -if $data3_192.168.0.1 != 4 then +print 192.168.0.1 openVnodes $data3_1 +print 192.168.0.2 openVnodes $data3_2 +if $data3_1 != 4 then goto show2 endi -if $data3_192.168.0.2 != 3 then +if $data3_2 != 3 then goto show2 endi diff --git a/tests/script/unique/dnode/offline1.sim b/tests/script/unique/dnode/offline1.sim index 4e05916e56..d61971a439 100644 --- a/tests/script/unique/dnode/offline1.sim +++ b/tests/script/unique/dnode/offline1.sim @@ -29,10 +29,10 @@ system sh/cfg.sh -n dnode2 -c clog -v 1 system sh/cfg.sh -n dnode3 -c clog -v 1 print ========== step1 -system sh/exec.sh -n dnode1 -s start +system sh/exec_up.sh -n dnode1 -s start sql connect sql create dnode 192.168.0.2 -system sh/exec.sh -n dnode2 -s start +system sh/exec_up.sh -n dnode2 -s start sleep 3000 sql show dnodes @@ -44,7 +44,7 @@ if $data4_192.168.0.2 != ready then endi print ========== step2 -system sh/exec.sh -n dnode2 -s stop -x SIGINT +system sh/exec_up.sh -n dnode2 -s stop -x SIGINT sleep 6000 sql show dnodes diff --git a/tests/script/unique/dnode/offline2.sim b/tests/script/unique/dnode/offline2.sim index cd9ec5ee5c..9a0bfd18b7 100644 --- a/tests/script/unique/dnode/offline2.sim +++ b/tests/script/unique/dnode/offline2.sim @@ -29,10 +29,10 @@ system sh/cfg.sh -n dnode2 -c clog -v 1 system sh/cfg.sh -n dnode3 -c clog -v 1 print ========== step1 -system sh/exec.sh -n dnode1 -s start +system sh/exec_up.sh -n dnode1 -s start sql connect sql create dnode 192.168.0.2 -system sh/exec.sh -n dnode2 -s start +system sh/exec_up.sh -n dnode2 -s start sleep 3000 sql create database d1 replica 2 tables 4 @@ -48,7 +48,7 @@ if $data4_192.168.0.2 != ready then endi print ========== step2 -system sh/exec.sh -n dnode2 -s stop -x SIGINT +system sh/exec_up.sh -n dnode2 -s stop -x SIGINT sleep 5000 sql show dnodes @@ -72,7 +72,7 @@ endi print ========== step4 sql create dnode 192.168.0.3 -system sh/exec.sh -n dnode3 -s start +system sh/exec_up.sh -n dnode3 -s start sql drop dnode 192.168.0.2 sleep 5000 diff --git a/tests/script/unique/dnode/remove1.sim b/tests/script/unique/dnode/remove1.sim index 8d5a3c5ee6..76429cdd22 100644 --- a/tests/script/unique/dnode/remove1.sim +++ b/tests/script/unique/dnode/remove1.sim @@ -31,7 +31,7 @@ system sh/cfg.sh -n dnode3 -c clog -v 1 system sh/cfg.sh -n dnode4 -c clog -v 1 print ========== step1 -system sh/exec.sh -n dnode1 -s start +system sh/exec_up.sh -n dnode1 -s start sql connect sleep 3000 @@ -52,14 +52,14 @@ sql insert into d2.t2 values(now+4s, 22) sql insert into d2.t2 values(now+5s, 21) sql show dnodes -print 192.168.0.1 freeVnodes $data3_192.168.0.1 -if $data3_192.168.0.1 != 2 then +print 192.168.0.1 openVnodes $data3_1 +if $data3_1 != 2 then return -1 endi print ========== step2 sql create dnode 192.168.0.2 -system sh/exec.sh -n dnode2 -s start +system sh/exec_up.sh -n dnode2 -s start sleep 9000 sql create database d3 replica 2 tables 4 @@ -79,12 +79,12 @@ show2: endi sql show dnodes -print 192.168.0.1 freeVnodes $data3_192.168.0.1 -print 192.168.0.2 freeVnodes $data3_192.168.0.2 -if $data3_192.168.0.1 != 3 then +print 192.168.0.1 openVnodes $data3_1 +print 192.168.0.2 openVnodes $data3_2 +if $data3_1 != 3 then goto show2 endi -if $data3_192.168.0.2 != 1 then +if $data3_2 != 1 then goto show2 endi @@ -101,12 +101,12 @@ show3: endi sql show dnodes -print 192.168.0.1 freeVnodes $data3_192.168.0.1 -print 192.168.0.2 freeVnodes $data3_192.168.0.2 $data5_192.168.0.2 +print 192.168.0.1 openVnodes $data3_1 +print 192.168.0.2 openVnodes $data3_2 $data5_192.168.0.2 print ========== step4 sql create dnode 192.168.0.3 -system sh/exec.sh -n dnode3 -s start +system sh/exec_up.sh -n dnode3 -s start $x = 0 show4: @@ -117,18 +117,18 @@ show4: endi sql show dnodes -print 192.168.0.1 freeVnodes $data3_192.168.0.1 -print 192.168.0.2 freeVnodes $data3_192.168.0.2 -print 192.168.0.3 freeVnodes $data3_192.168.0.3 -if $data3_192.168.0.2 != null then +print 192.168.0.1 openVnodes $data3_1 +print 192.168.0.2 openVnodes $data3_2 +print 192.168.0.3 openVnodes $data3_3 +if $data3_2 != null then goto show4 endi -system sh/exec.sh -n dnode2 -s stop -x SIGINT +system sh/exec_up.sh -n dnode2 -s stop -x SIGINT print ========== step5 sql create dnode 192.168.0.4 -system sh/exec.sh -n dnode4 -s start +system sh/exec_up.sh -n dnode4 -s start $x = 0 show5: @@ -138,20 +138,20 @@ show5: return -1 endi sql show dnodes -print 192.168.0.1 freeVnodes $data3_192.168.0.1 -print 192.168.0.2 freeVnodes $data3_192.168.0.2 -print 192.168.0.3 freeVnodes $data3_192.168.0.3 -print 192.168.0.4 freeVnodes $data3_192.168.0.4 -if $data3_192.168.0.1 != 4 then +print 192.168.0.1 openVnodes $data3_1 +print 192.168.0.2 openVnodes $data3_2 +print 192.168.0.3 openVnodes $data3_3 +print 192.168.0.4 openVnodes $data3_4 +if $data3_1 != 4 then goto show5 endi -if $data3_192.168.0.2 != null then +if $data3_2 != null then goto show5 endi -if $data3_192.168.0.3 != 2 then +if $data3_3 != 2 then goto show5 endi -if $data3_192.168.0.4 != 2 then +if $data3_4 != 2 then goto show5 endi diff --git a/tests/script/unique/dnode/remove2.sim b/tests/script/unique/dnode/remove2.sim index d8727767ad..9b808920a6 100644 --- a/tests/script/unique/dnode/remove2.sim +++ b/tests/script/unique/dnode/remove2.sim @@ -31,7 +31,7 @@ system sh/cfg.sh -n dnode3 -c clog -v 1 system sh/cfg.sh -n dnode4 -c clog -v 1 print ========== step1 -system sh/exec.sh -n dnode1 -s start +system sh/exec_up.sh -n dnode1 -s start sql connect sleep 3000 @@ -52,14 +52,14 @@ sql insert into d2.t2 values(now+4s, 22) sql insert into d2.t2 values(now+5s, 21) sql show dnodes -print 192.168.0.1 freeVnodes $data3_192.168.0.1 -if $data3_192.168.0.1 != 2 then +print 192.168.0.1 openVnodes $data3_1 +if $data3_1 != 2 then return -1 endi print ========== step2 sql create dnode 192.168.0.2 -system sh/exec.sh -n dnode2 -s start +system sh/exec_up.sh -n dnode2 -s start sleep 9000 sql create database d3 replica 2 tables 4 @@ -79,17 +79,17 @@ show2: endi sql show dnodes -print 192.168.0.1 freeVnodes $data3_192.168.0.1 -print 192.168.0.2 freeVnodes $data3_192.168.0.2 -if $data3_192.168.0.1 != 3 then +print 192.168.0.1 openVnodes $data3_1 +print 192.168.0.2 openVnodes $data3_2 +if $data3_1 != 3 then goto show2 endi -if $data3_192.168.0.2 != 1 then +if $data3_2 != 1 then goto show2 endi print ========== step3 -system sh/exec.sh -n dnode2 -s stop -x SIGINT +system sh/exec_up.sh -n dnode2 -s stop -x SIGINT sql drop dnode 192.168.0.2 sleep 7001 @@ -102,12 +102,12 @@ show3: endi sql show dnodes -print 192.168.0.1 freeVnodes $data3_192.168.0.1 -print 192.168.0.2 freeVnodes $data3_192.168.0.2 $data5_192.168.0.2 +print 192.168.0.1 openVnodes $data3_1 +print 192.168.0.2 openVnodes $data3_2 $data5_192.168.0.2 print ========== step4 sql create dnode 192.168.0.3 -system sh/exec.sh -n dnode3 -s start +system sh/exec_up.sh -n dnode3 -s start $x = 0 show4: @@ -118,16 +118,16 @@ show4: endi sql show dnodes -print 192.168.0.1 freeVnodes $data3_192.168.0.1 -print 192.168.0.2 freeVnodes $data3_192.168.0.2 -print 192.168.0.3 freeVnodes $data3_192.168.0.3 -if $data3_192.168.0.2 != null then +print 192.168.0.1 openVnodes $data3_1 +print 192.168.0.2 openVnodes $data3_2 +print 192.168.0.3 openVnodes $data3_3 +if $data3_2 != null then goto show4 endi -if $data3_192.168.0.1 != 3 then +if $data3_1 != 3 then goto show4 endi -if $data3_192.168.0.3 != 1 then +if $data3_3 != 1 then goto show4 endi diff --git a/tests/script/unique/dnode/vnode_clean.sim b/tests/script/unique/dnode/vnode_clean.sim index 300d1dd4f0..2ce9645108 100644 --- a/tests/script/unique/dnode/vnode_clean.sim +++ b/tests/script/unique/dnode/vnode_clean.sim @@ -31,7 +31,7 @@ system sh/cfg.sh -n dnode3 -c clog -v 1 system sh/cfg.sh -n dnode4 -c clog -v 1 print ========== step1 -system sh/exec.sh -n dnode1 -s start +system sh/exec_up.sh -n dnode1 -s start sql connect sql create database d1 tables 4 @@ -43,14 +43,14 @@ sql insert into d1.t1 values(now+4s, 12) sql insert into d1.t1 values(now+5s, 11) sql show dnodes -print 192.168.0.1 freeVnodes $data3_192.168.0.1 -if $data3_192.168.0.1 != 3 then +print 192.168.0.1 openVnodes $data3_1 +if $data3_1 != 3 then return -1 endi print ========== step2 sql create dnode 192.168.0.2 -system sh/exec.sh -n dnode2 -s start +system sh/exec_up.sh -n dnode2 -s start $x = 0 show2: @@ -60,12 +60,12 @@ show2: return -1 endi sql show dnodes -print 192.168.0.1 freeVnodes $data3_192.168.0.1 -print 192.168.0.2 freeVnodes $data3_192.168.0.2 -if $data3_192.168.0.1 != 4 then +print 192.168.0.1 openVnodes $data3_1 +print 192.168.0.2 openVnodes $data3_2 +if $data3_1 != 4 then goto show2 endi -if $data3_192.168.0.2 != 3 then +if $data3_2 != 3 then goto show2 endi @@ -81,12 +81,12 @@ sql insert into d2.t2 values(now+5s, 21) $x = 0 sql show dnodes -print 192.168.0.1 freeVnodes $data3_192.168.0.1 -print 192.168.0.2 freeVnodes $data3_192.168.0.2 -if $data3_192.168.0.1 != 4 then +print 192.168.0.1 openVnodes $data3_1 +print 192.168.0.2 openVnodes $data3_2 +if $data3_1 != 4 then return -1 endi -if $data3_192.168.0.2 != 2 then +if $data3_2 != 2 then return -1 endi @@ -101,19 +101,19 @@ show4: return -1 endi sql show dnodes -print 192.168.0.1 freeVnodes $data3_192.168.0.1 -print 192.168.0.2 freeVnodes $data3_192.168.0.2 -if $data3_192.168.0.1 != 2 then +print 192.168.0.1 openVnodes $data3_1 +print 192.168.0.2 openVnodes $data3_2 +if $data3_1 != 2 then goto show4 endi -if $data3_192.168.0.2 != null then +if $data3_2 != null then goto show4 endi if $rows != 1 then goto show4 endi -system sh/exec.sh -n dnode2 -s stop -x SIGINT +system sh/exec_up.sh -n dnode2 -s stop -x SIGINT print ========== step5 sleep 2000 @@ -125,7 +125,7 @@ system sh/cfg.sh -n dnode2 -c balanceMonitorInterval -v 1 system sh/cfg.sh -n dnode2 -c balanceStartInterval -v 10 system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 4 system sh/cfg.sh -n dnode2 -c clog -v 1 -system sh/exec.sh -n dnode2 -s start +system sh/exec_up.sh -n dnode2 -s start $x = 0 show5: @@ -135,12 +135,12 @@ show5: return -1 endi sql show dnodes -print 192.168.0.1 freeVnodes $data3_192.168.0.1 -print 192.168.0.2 freeVnodes $data3_192.168.0.2 -if $data3_192.168.0.1 != 4 then +print 192.168.0.1 openVnodes $data3_1 +print 192.168.0.2 openVnodes $data3_2 +if $data3_1 != 4 then goto show5 endi -if $data3_192.168.0.2 != 2 then +if $data3_2 != 2 then goto show5 endi @@ -154,18 +154,18 @@ sql insert into d3.t3 values(now+4s, 32) sql insert into d3.t3 values(now+5s, 31) sql show dnodes -print 192.168.0.1 freeVnodes $data3_192.168.0.1 -print 192.168.0.2 freeVnodes $data3_192.168.0.2 -if $data3_192.168.0.1 != 4 then +print 192.168.0.1 openVnodes $data3_1 +print 192.168.0.2 openVnodes $data3_2 +if $data3_1 != 4 then return -1 endi -if $data3_192.168.0.2 != 1 then +if $data3_2 != 1 then return -1 endi print ========== step7 sql create dnode 192.168.0.3 -system sh/exec.sh -n dnode3 -s start +system sh/exec_up.sh -n dnode3 -s start $x = 0 show7: @@ -176,16 +176,16 @@ show7: endi sql show dnodes -print 192.168.0.1 freeVnodes $data3_192.168.0.1 -print 192.168.0.2 freeVnodes $data3_192.168.0.2 -print 192.168.0.3 freeVnodes $data3_192.168.0.3 -if $data3_192.168.0.1 != 4 then +print 192.168.0.1 openVnodes $data3_1 +print 192.168.0.2 openVnodes $data3_2 +print 192.168.0.3 openVnodes $data3_3 +if $data3_1 != 4 then goto show7 endi -if $data3_192.168.0.2 != 2 then +if $data3_2 != 2 then goto show7 endi -if $data3_192.168.0.3 != 3 then +if $data3_3 != 3 then goto show7 endi @@ -206,16 +206,16 @@ show8: return -1 endi sql show dnodes -print 192.168.0.1 freeVnodes $data3_192.168.0.1 -print 192.168.0.2 freeVnodes $data3_192.168.0.2 -print 192.168.0.3 freeVnodes $data3_192.168.0.3 -if $data3_192.168.0.1 != 4 then +print 192.168.0.1 openVnodes $data3_1 +print 192.168.0.2 openVnodes $data3_2 +print 192.168.0.3 openVnodes $data3_3 +if $data3_1 != 4 then goto show8 endi -if $data3_192.168.0.2 != 2 then +if $data3_2 != 2 then goto show8 endi -if $data3_192.168.0.3 != 2 then +if $data3_3 != 2 then goto show8 endi @@ -231,20 +231,20 @@ show9: endi sql show dnodes -print 192.168.0.1 freeVnodes $data3_192.168.0.1 -print 192.168.0.2 freeVnodes $data3_192.168.0.2 -print 192.168.0.3 freeVnodes $data3_192.168.0.3 -if $data3_192.168.0.1 != 4 then +print 192.168.0.1 openVnodes $data3_1 +print 192.168.0.2 openVnodes $data3_2 +print 192.168.0.3 openVnodes $data3_3 +if $data3_1 != 4 then goto show9 endi -if $data3_192.168.0.2 != null then +if $data3_2 != null then goto show9 endi -if $data3_192.168.0.3 != 0 then +if $data3_3 != 0 then goto show9 endi -system sh/exec.sh -n dnode2 -s stop -x SIGINT +system sh/exec_up.sh -n dnode2 -s stop -x SIGINT print ========== step10 sql select * from d1.t1 order by t desc -- GitLab