From a41e2ad3bf1341aeca784e71e60c52f048a16015 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Sat, 19 Dec 2020 13:15:31 +0800 Subject: [PATCH] scripts --- tests/script/unique/db/replica_add12.sim | 4 ++++ tests/script/unique/db/replica_add13.sim | 1 + tests/script/unique/db/replica_add23.sim | 1 + tests/script/unique/db/replica_part.sim | 3 +++ tests/script/unique/db/replica_reduce21.sim | 5 +++++ tests/script/unique/db/replica_reduce31.sim | 4 ++++ tests/script/unique/db/replica_reduce32.sim | 3 +++ 7 files changed, 21 insertions(+) diff --git a/tests/script/unique/db/replica_add12.sim b/tests/script/unique/db/replica_add12.sim index e29cf1ba73..62d7e9daa3 100644 --- a/tests/script/unique/db/replica_add12.sim +++ b/tests/script/unique/db/replica_add12.sim @@ -115,6 +115,7 @@ sql insert into d1.t1 values(now, 2) sql insert into d2.t2 values(now, 2) sql insert into d3.t3 values(now, 2) sql insert into d4.t4 values(now, 2) +sleep 1000 sql select * from d1.t1 if $rows != 2 then @@ -154,6 +155,7 @@ sql_error insert into d1.t1 values(now, 3) sql_error insert into d2.t2 values(now, 3) sql_error insert into d3.t3 values(now, 3) sql_error insert into d4.t4 values(now, 3) +sleep 1000 print ========= step6 system sh/exec.sh -n dnode2 -s start @@ -193,6 +195,7 @@ sql_error insert into d1.t1 values(now, 3) sql_error insert into d2.t2 values(now, 3) sql_error insert into d3.t3 values(now, 3) sql_error insert into d4.t4 values(now, 3) +sleep 1000 sql_error select * from d1.t1 sql_error select * from d2.t2 @@ -207,6 +210,7 @@ sql insert into d1.t1 values(now, 5) sql insert into d2.t2 values(now, 5) sql insert into d3.t3 values(now, 5) sql insert into d4.t4 values(now, 5) +sleep 1000 sql select * from d1.t1 if $rows != 4 then diff --git a/tests/script/unique/db/replica_add13.sim b/tests/script/unique/db/replica_add13.sim index defe306f2f..5d34440e3e 100644 --- a/tests/script/unique/db/replica_add13.sim +++ b/tests/script/unique/db/replica_add13.sim @@ -46,6 +46,7 @@ sql insert into d1.t1 values(1589529000011, 1) sql insert into d2.t2 values(1589529000021, 1) sql insert into d3.t3 values(1589529000031, 1) sql insert into d4.t4 values(1589529000041, 1) +sleep 1000 sql select * from d1.t1 if $rows != 1 then diff --git a/tests/script/unique/db/replica_add23.sim b/tests/script/unique/db/replica_add23.sim index d93894deb8..9285f68137 100644 --- a/tests/script/unique/db/replica_add23.sim +++ b/tests/script/unique/db/replica_add23.sim @@ -46,6 +46,7 @@ sql insert into d1.t1 values(1588262400001, 1) sql insert into d2.t2 values(1588262400001, 1) sql insert into d3.t3 values(1588262400001, 1) sql insert into d4.t4 values(1588262400001, 1) +sleep 1000 sql select * from d1.t1 if $rows != 1 then diff --git a/tests/script/unique/db/replica_part.sim b/tests/script/unique/db/replica_part.sim index de3f6203d2..5c5f98a108 100644 --- a/tests/script/unique/db/replica_part.sim +++ b/tests/script/unique/db/replica_part.sim @@ -38,6 +38,7 @@ sql insert into d2.t2 values(now, 1) sql insert into d1.t1 values(now, 1) sql insert into d3.t3 values(now, 1) sql insert into d4.t4 values(now, 1) +sleep 1000 sql select * from d1.t1 if $rows != 1 then @@ -77,6 +78,7 @@ sql insert into d1.t1 values(now, 2) sql insert into d2.t2 values(now, 2) sql insert into d3.t3 values(now, 2) sql insert into d4.t4 values(now, 2) +sleep 1000 sql select * from d1.t1 if $rows != 2 then @@ -137,6 +139,7 @@ sql insert into d1.t1 values(now, 5) sql insert into d2.t2 values(now, 5) sql insert into d3.t3 values(now, 5) sql insert into d4.t4 values(now, 5) +sleep 1000 sql select * from d1.t1 sql select * from d2.t2 diff --git a/tests/script/unique/db/replica_reduce21.sim b/tests/script/unique/db/replica_reduce21.sim index a64f4370c8..7fe7d9504a 100644 --- a/tests/script/unique/db/replica_reduce21.sim +++ b/tests/script/unique/db/replica_reduce21.sim @@ -36,6 +36,7 @@ sql insert into d2.t2 values(now, 1) sql insert into d1.t1 values(now, 1) sql insert into d3.t3 values(now, 1) sql insert into d4.t4 values(now, 1) +sleep 1000 sql select * from d1.t1 if $rows != 1 then @@ -67,6 +68,7 @@ sleep 12000 print ========= step4 query d1 sql insert into d1.t1 values(now, 2) sql select * from d1.t1 +sleep 1000 if $rows != 2 then return -1 endi @@ -75,6 +77,7 @@ print ========= step5 query d5 sql create table d5.t5 (ts timestamp, i int) sql insert into d5.t5 values(now, 1); sql select * from d5.t5 +sleep 1000 if $rows != 1 then return -1 endi @@ -89,6 +92,7 @@ sql insert into d5.t5 values(now, 2) sql insert into d2.t2 values(now, 2) sql insert into d3.t3 values(now, 2) sql insert into d4.t4 values(now, 2) +sleep 1000 sql select * from d5.t5 if $rows != 2 then @@ -118,6 +122,7 @@ sql insert into d5.t5 values(now, 3) sql insert into d2.t2 values(now, 3) sql insert into d3.t3 values(now, 3) sql insert into d4.t4 values(now, 3) +sleep 1000 sql select * from d5.t5 if $rows != 3 then diff --git a/tests/script/unique/db/replica_reduce31.sim b/tests/script/unique/db/replica_reduce31.sim index 3ed0a1e3b9..cbe0417dbd 100644 --- a/tests/script/unique/db/replica_reduce31.sim +++ b/tests/script/unique/db/replica_reduce31.sim @@ -38,6 +38,7 @@ sql insert into d1.t1 values(now, 1) sql insert into d2.t2 values(now, 1) sql insert into d3.t3 values(now, 1) sql insert into d4.t4 values(now, 1) +sleep 1000 sql select * from d1.t1 if $rows != 1 then @@ -83,6 +84,7 @@ sql insert into d1.t1 values(now, 2) sql insert into d2.t2 values(now, 2) sql insert into d3.t3 values(now, 2) sql insert into d4.t4 values(now, 2) +sleep 1000 sql select * from d1.t1 if $rows != 2 then @@ -114,6 +116,7 @@ sql insert into d1.t1 values(now, 3) sql insert into d2.t2 values(now, 3) sql insert into d3.t3 values(now, 3) sql insert into d4.t4 values(now, 3) +sleep 1000 sql select * from d1.t1 if $rows != 3 then @@ -174,6 +177,7 @@ sql insert into d1.t1 values(now, 6) sql insert into d2.t2 values(now, 6) sql insert into d3.t3 values(now, 6) sql insert into d4.t4 values(now, 6) +sleep 1000 sql select * from d1.t1 sql select * from d2.t2 diff --git a/tests/script/unique/db/replica_reduce32.sim b/tests/script/unique/db/replica_reduce32.sim index 664a286be4..c453f16ce6 100644 --- a/tests/script/unique/db/replica_reduce32.sim +++ b/tests/script/unique/db/replica_reduce32.sim @@ -38,6 +38,7 @@ sql insert into d2.t2 values(now, 1) sql insert into d1.t1 values(now, 1) sql insert into d3.t3 values(now, 1) sql insert into d4.t4 values(now, 1) +sleep 1000 sql select * from d1.t1 if $rows != 1 then @@ -71,6 +72,7 @@ sql insert into d1.t1 values(now, 2) sql insert into d2.t2 values(now, 2) sql insert into d3.t3 values(now, 2) sql insert into d4.t4 values(now, 2) +sleep 1000 sql select * from d1.t1 if $rows != 2 then @@ -132,6 +134,7 @@ sql insert into d1.t1 values(now, 5) sql insert into d2.t2 values(now, 5) sql insert into d3.t3 values(now, 5) sql insert into d4.t4 values(now, 5) +sleep 1000 sql select * from d1.t1 print d1.t1 $rows -- GitLab