From 177334e0b70adc07b5d2b4106ce5a5ba6fc6fdc7 Mon Sep 17 00:00:00 2001 From: slguan Date: Mon, 27 Apr 2020 12:08:19 +0800 Subject: [PATCH] add script --- tests/script/unique/db/replica_add12.sim | 41 ++++++++++++++++-------- 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/tests/script/unique/db/replica_add12.sim b/tests/script/unique/db/replica_add12.sim index 9f5adfeb06..969a2a2091 100644 --- a/tests/script/unique/db/replica_add12.sim +++ b/tests/script/unique/db/replica_add12.sim @@ -98,16 +98,9 @@ sql alter database d1 replica 2 sql alter database d2 replica 2 sql alter database d3 replica 2 sql alter database d4 replica 2 -sleep 2000 +sleep 10000 print ======== step3 -$x = 0 -show3: - $x = $x + 1 - sleep 2000 - if $x == 10 then - return -1 - endi sql show dnodes print dnode192.168.0.1 ==> openVnodes: $data3_1 @@ -115,18 +108,17 @@ print dnode192.168.0.2 ==> openVnodes: $data3_2 print dnode192.168.0.3 ==> openVnodes: $data3_3 if $data3_1 != 0 then - goto show3 + return -1 endi if $data3_2 != 4 then - goto show3 + return -1 endi if $data3_3 != 4 then - goto show3 + return -1 endi - print ======== step4 sql insert into d1.t1 values(now, 2) sql insert into d2.t2 values(now, 2) @@ -153,11 +145,34 @@ if $rows != 2 then return -1 endi -sleep 10000 +sleep 2000 print ========= step5 system sh/exec_up.sh -n dnode2 -s stop -x SIGINT sleep 5000 +sql select * from d1.t1 +if $rows != 2 then + return -1 +endi + +sql select * from d2.t2 +if $rows != 2 then + return -1 +endi + +sql select * from d3.t3 +if $rows != 2 then + return -1 +endi + +sql select * from d4.t4 +if $rows != 2 then + return -1 +endi + +print ===== insert data + + sql insert into d1.t1 values(now, 3) sql insert into d2.t2 values(now, 3) sql insert into d3.t3 values(now, 3) -- GitLab