From 70dd2be627d7cee9f361b6bef060ff4dcc31c371 Mon Sep 17 00:00:00 2001 From: Hui Li Date: Wed, 29 Jul 2020 16:42:36 +0800 Subject: [PATCH 1/7] [modify cases] --- .../unique/clusterSimCase/client-01.sim | 4 +-- .../unique/clusterSimCase/client-02.sim | 20 +++++++------- .../unique/clusterSimCase/client-03.sim | 27 ++++++++++--------- .../unique/clusterSimCase/client-04.sim | 20 +++++++------- .../unique/clusterSimCase/client-05.sim | 20 +++++++------- .../unique/clusterSimCase/client-06.sim | 20 +++++++------- .../unique/clusterSimCase/client-07.sim | 22 +++++++-------- .../unique/clusterSimCase/client-08.sim | 22 +++++++-------- .../unique/clusterSimCase/cluster_main.sim | 17 +++++++----- 9 files changed, 89 insertions(+), 83 deletions(-) diff --git a/tests/script/unique/clusterSimCase/client-01.sim b/tests/script/unique/clusterSimCase/client-01.sim index f334828b41..b35790d69e 100644 --- a/tests/script/unique/clusterSimCase/client-01.sim +++ b/tests/script/unique/clusterSimCase/client-01.sim @@ -57,10 +57,10 @@ while $i < $tblEnd endw sql select count(*) from $tb +print data00 $data00 rowsPerTbl $rowsPerTbl if $data00 != $rowsPerTbl then - print data00 $data00 rowsPerTbl $rowsPerTbl print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - print ************ client-01 insert data error ***** ***** + print ************ client-01 insert data into $tb error ***** ***** print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ return -1 endi diff --git a/tests/script/unique/clusterSimCase/client-02.sim b/tests/script/unique/clusterSimCase/client-02.sim index 4887193438..30a2ceb089 100644 --- a/tests/script/unique/clusterSimCase/client-02.sim +++ b/tests/script/unique/clusterSimCase/client-02.sim @@ -6,7 +6,7 @@ $tblStart = 0 $tblEnd = 10000 $tsStart = 1325347200000 # 2012-01-01 00:00:00.000 -$c2Binary = ' . client-02- +$preBinary = ' . client-02- ############################################################### sql connect @@ -31,13 +31,14 @@ $rowsPerTbl = 0 $ts = $tsStart $rowsPerLoop = 160 +$loop_cnt = 0 loop_run: -print ================ client-02 start loop insert data +print ================ client-02 start loop insert data ( loop_cnt: $loop_cnt ) $i = $tblStart while $i < $tblEnd $tb = tb . $i - $c2Binary = $c2Binary . $i + $c2Binary = $preBinary . $i $c2Binary = $c2Binary . ' $x = 0 @@ -46,23 +47,24 @@ while $i < $tblEnd sql insert into $tb values ( $ts + 1a , $x , $c2Binary ) ( $ts + 3a , $x , $c2Binary ) ( $ts + 5a , $x , $c2Binary ) ( $ts + 7a , $x , $c2Binary ) ( $ts + 9a , $x , $c2Binary ) ( $ts + 11a , $x , $c2Binary ) ( $ts + 13a , $x , $c2Binary ) ( $ts + 15a , $x , $c2Binary ) ( $ts + 17a , $x , $c2Binary ) ( $ts + 19a , $x , $c2Binary ) ( $ts + 21a , $x , $c2Binary ) ( $ts + 23a , $x , $c2Binary ) ( $ts + 25a , $x , $c2Binary ) ( $ts + 27a , $x , $c2Binary ) ( $ts + 29a , $x , $c2Binary ) ( $ts + 31a , $x , $c2Binary ) ( $ts + 33a , $x , $c2Binary ) ( $ts + 35a , $x , $c2Binary ) ( $ts + 37a , $x , $c2Binary ) ( $ts + 39a , $x , $c2Binary ) $x = $x + 40 $ts = $ts + 40a - if $i == $tblStart then - $rowsPerTbl = $rowsPerTbl + $x - endi endw + if $i == $tblStart then + $rowsPerTbl = $rowsPerTbl + $x + endi $totalRows = $totalRows + $x $i = $i + 1 endw -sql select count(*) from $tblStart +sql select count(*) from $tb +print data00 $data00 rowsPerTbl $rowsPerTbl if $data00 != $rowsPerTbl then - print data00 $data00 rowsPerTbl $rowsPerTbl print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - print ************ client-02 insert data error ***** ***** + print ************ client-02 insert data into $tb error ***** ***** print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ return -1 endi +$loop_cnt = $loop_cnt + 1 goto loop_run diff --git a/tests/script/unique/clusterSimCase/client-03.sim b/tests/script/unique/clusterSimCase/client-03.sim index d05b1c86be..78a25e26a5 100644 --- a/tests/script/unique/clusterSimCase/client-03.sim +++ b/tests/script/unique/clusterSimCase/client-03.sim @@ -6,8 +6,7 @@ $tblStart = 0 $tblEnd = 10000 $tsStart = 1325347200000 # 2012-01-01 00:00:00.000 -$c2Binary = ' . client-03- -$t2Binary = ' . client-03- +$preBinary = ' . client-03- ############################################################### sql connect @@ -33,16 +32,17 @@ $rowsPerTbl = 0 $ts = $tsStart $rowsPerLoop = 160 +$loop_cnt = 0 loop_run: -print ================ client-03 start loop insert data +print ================ client-03 start loop insert data ( loop_cnt: $loop_cnt ) $i = $tblStart while $i < $tblEnd $tb = tb . $i - $t2Binary = ' . $i + $t2Binary = $preBinary . $i $t2Binary = $t2Binary . ' - $c2Binary = $c2Binary . $i + $c2Binary = $preBinary . $i $c2Binary = $c2Binary . ' $x = 0 @@ -51,32 +51,33 @@ while $i < $tblEnd sql insert into $tb using $stb tags ( $i , $t2Binary ) values ( $ts + 1a , $x , $c2Binary ) ( $ts + 3a , $x , $c2Binary ) ( $ts + 5a , $x , $c2Binary ) ( $ts + 7a , $x , $c2Binary ) ( $ts + 9a , $x , $c2Binary ) ( $ts + 11a , $x , $c2Binary ) ( $ts + 13a , $x , $c2Binary ) ( $ts + 15a , $x , $c2Binary ) ( $ts + 17a , $x , $c2Binary ) ( $ts + 19a , $x , $c2Binary ) ( $ts + 21a , $x , $c2Binary ) ( $ts + 23a , $x , $c2Binary ) ( $ts + 25a , $x , $c2Binary ) ( $ts + 27a , $x , $c2Binary ) ( $ts + 29a , $x , $c2Binary ) ( $ts + 31a , $x , $c2Binary ) ( $ts + 33a , $x , $c2Binary ) ( $ts + 35a , $x , $c2Binary ) ( $ts + 37a , $x , $c2Binary ) ( $ts + 39a , $x , $c2Binary ) $x = $x + 40 $ts = $ts + 40a - if $i == $tblStart then - $rowsPerTbl = $rowsPerTbl + $x - endi endw + if $i == $tblStart then + $rowsPerTbl = $rowsPerTbl + $x + endi $totalRows = $totalRows + $x $i = $i + 1 endw -sql select count(*) from $tblStart +sql select count(*) from $tb +print data00 $data00 rowsPerTbl $rowsPerTbl if $data00 != $rowsPerTbl then - print data00 $data00 rowsPerTbl $rowsPerTbl + print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - print ****** client-3 insert data into $tblStart error *** + print ****** client-3 insert data into $tb error *** print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ return -1 endi sql select count(*) from $stb +print data00 $data00 totalRows $totalRows if $data00 != $totalRows then - print data00 $data00 totalRows $totalRows print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ print ***** client-3 insert data into $stbl error ******** print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ return -1 endi - +$loop_cnt = $loop_cnt + 1 goto loop_run diff --git a/tests/script/unique/clusterSimCase/client-04.sim b/tests/script/unique/clusterSimCase/client-04.sim index ec10454b86..6a210904ec 100644 --- a/tests/script/unique/clusterSimCase/client-04.sim +++ b/tests/script/unique/clusterSimCase/client-04.sim @@ -6,7 +6,7 @@ $tblStart = 0 $tblEnd = 10000 $tsStart = 1325347200000 # 2012-01-01 00:00:00.000 -$c2Binary = ' . client-04- +$preBinary = ' . client-04- ############################################################### $totalRows = 0 @@ -41,7 +41,7 @@ $i = $tblStart while $i < $tblEnd $tb = tb . $i - $c2Binary = $c2Binary . $i + $c2Binary = $preBinary . $i $c2Binary = $c2Binary . ' $x = 0 @@ -50,22 +50,22 @@ while $i < $tblEnd sql insert into $tb values ( $ts + 1a , $x , $c2Binary ) ( $ts + 3a , $x , $c2Binary ) ( $ts + 5a , $x , $c2Binary ) ( $ts + 7a , $x , $c2Binary ) ( $ts + 9a , $x , $c2Binary ) ( $ts + 11a , $x , $c2Binary ) ( $ts + 13a , $x , $c2Binary ) ( $ts + 15a , $x , $c2Binary ) ( $ts + 17a , $x , $c2Binary ) ( $ts + 19a , $x , $c2Binary ) ( $ts + 21a , $x , $c2Binary ) ( $ts + 23a , $x , $c2Binary ) ( $ts + 25a , $x , $c2Binary ) ( $ts + 27a , $x , $c2Binary ) ( $ts + 29a , $x , $c2Binary ) ( $ts + 31a , $x , $c2Binary ) ( $ts + 33a , $x , $c2Binary ) ( $ts + 35a , $x , $c2Binary ) ( $ts + 37a , $x , $c2Binary ) ( $ts + 39a , $x , $c2Binary ) $x = $x + 40 $ts = $ts + 40a - if $i == $tblStart then - $rowsPerTbl = $rowsPerTbl + $x - endi endw + if $i == $tblStart then + $rowsPerTbl = $rowsPerTbl + $x + endi $totalRows = $totalRows + $x $i = $i + 1 endw -sql select count(*) from $tblStart +sql select count(*) from $tb +print data00 $data00 rowsPerTbl $rowsPerTbl if $data00 != $rowsPerTbl then - print data00 $data00 rowsPerTbl $rowsPerTbl - print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - print ************ client-04 insert data error ***** ***** - print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + print ************ client-04 insert data into $tb error ***** ***** + print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ return -1 endi diff --git a/tests/script/unique/clusterSimCase/client-05.sim b/tests/script/unique/clusterSimCase/client-05.sim index af64c10dd5..971558d443 100644 --- a/tests/script/unique/clusterSimCase/client-05.sim +++ b/tests/script/unique/clusterSimCase/client-05.sim @@ -5,7 +5,7 @@ $tblStart = 0 $tblEnd = 10000 $tsStart = 1325347200000 # 2012-01-01 00:00:00.000 -$c2Binary = ' . client-05- +$preBinary = ' . client-05- ############################################################### $totalRows = 0 @@ -35,7 +35,7 @@ $rowsPerLoop = 160 $loopCnt = 0 loop_run: -print ================ client-05 start loop insert data +print ================ client-05 start loop insert data ( loop_cnt: $loop_cnt ) $i = $tblStart while $i < $tblEnd $tb = tb . $i @@ -49,22 +49,22 @@ while $i < $tblEnd sql insert into $tb values ( $ts + 1a , $x , $c2Binary ) ( $ts + 3a , $x , $c2Binary ) ( $ts + 5a , $x , $c2Binary ) ( $ts + 7a , $x , $c2Binary ) ( $ts + 9a , $x , $c2Binary ) ( $ts + 11a , $x , $c2Binary ) ( $ts + 13a , $x , $c2Binary ) ( $ts + 15a , $x , $c2Binary ) ( $ts + 17a , $x , $c2Binary ) ( $ts + 19a , $x , $c2Binary ) ( $ts + 21a , $x , $c2Binary ) ( $ts + 23a , $x , $c2Binary ) ( $ts + 25a , $x , $c2Binary ) ( $ts + 27a , $x , $c2Binary ) ( $ts + 29a , $x , $c2Binary ) ( $ts + 31a , $x , $c2Binary ) ( $ts + 33a , $x , $c2Binary ) ( $ts + 35a , $x , $c2Binary ) ( $ts + 37a , $x , $c2Binary ) ( $ts + 39a , $x , $c2Binary ) $x = $x + 40 $ts = $ts + 40a - if $i == $tblStart then - $rowsPerTbl = $rowsPerTbl + $x - endi endw + if $i == $tblStart then + $rowsPerTbl = $rowsPerTbl + $x + endi $totalRows = $totalRows + $x $i = $i + 1 endw -sql select count(*) from $tblStart +sql select count(*) from $tb +print data00 $data00 rowsPerTbl $rowsPerTbl if $data00 != $rowsPerTbl then - print data00 $data00 rowsPerTbl $rowsPerTbl - print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - print ************ client-05 insert data error ***** ***** - print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + print ************ client-05 insert data into $tb error ***** ***** + print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ return -1 endi diff --git a/tests/script/unique/clusterSimCase/client-06.sim b/tests/script/unique/clusterSimCase/client-06.sim index f015831196..43a88b5ddd 100644 --- a/tests/script/unique/clusterSimCase/client-06.sim +++ b/tests/script/unique/clusterSimCase/client-06.sim @@ -6,7 +6,7 @@ $tblStart = 0 $tblEnd = 10000 $tsStart = 1325347200000 # 2012-01-01 00:00:00.000 -$c2Binary = ' . client-06- +$preBinary = ' . client-06- $numPerUpdateTbl = 2000 ############################################################### @@ -48,7 +48,7 @@ $i = $dropTblStart while $i < $tblEnd $tb = tb . $i - $c2Binary = $c2Binary . $i + $c2Binary = $preBinary . $i $c2Binary = $c2Binary . ' $x = 0 @@ -57,22 +57,22 @@ while $i < $tblEnd sql insert into $tb values ( $ts + 1a , $x , $c2Binary ) ( $ts + 3a , $x , $c2Binary ) ( $ts + 5a , $x , $c2Binary ) ( $ts + 7a , $x , $c2Binary ) ( $ts + 9a , $x , $c2Binary ) ( $ts + 11a , $x , $c2Binary ) ( $ts + 13a , $x , $c2Binary ) ( $ts + 15a , $x , $c2Binary ) ( $ts + 17a , $x , $c2Binary ) ( $ts + 19a , $x , $c2Binary ) ( $ts + 21a , $x , $c2Binary ) ( $ts + 23a , $x , $c2Binary ) ( $ts + 25a , $x , $c2Binary ) ( $ts + 27a , $x , $c2Binary ) ( $ts + 29a , $x , $c2Binary ) ( $ts + 31a , $x , $c2Binary ) ( $ts + 33a , $x , $c2Binary ) ( $ts + 35a , $x , $c2Binary ) ( $ts + 37a , $x , $c2Binary ) ( $ts + 39a , $x , $c2Binary ) $x = $x + 40 $ts = $ts + 40a - if $i == $tblStart then - $rowsPerTbl = $rowsPerTbl + $x - endi endw + if $i == $tblStart then + $rowsPerTbl = $rowsPerTbl + $x + endi $totalRows = $totalRows + $x $i = $i + 1 endw -sql select count(*) from $tblStart +sql select count(*) from $tb +print data00 $data00 rowsPerTbl $rowsPerTbl if $data00 != $rowsPerTbl then - print data00 $data00 rowsPerTbl $rowsPerTbl - print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - print ************ client-06 insert data error ***** ***** - print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + print ************ client-06 insert data into $tb error ***** ***** + print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ return -1 endi diff --git a/tests/script/unique/clusterSimCase/client-07.sim b/tests/script/unique/clusterSimCase/client-07.sim index 126ae76771..66284d418b 100644 --- a/tests/script/unique/clusterSimCase/client-07.sim +++ b/tests/script/unique/clusterSimCase/client-07.sim @@ -5,7 +5,7 @@ $tblStart = 0 $tblEnd = 10000 $tsStart = 1325347200000 # 2012-01-01 00:00:00.000 -$c2Binary = ' . client-07- +$preBinary = ' . client-07- ############################################################### $totalRows = 0 @@ -35,12 +35,12 @@ $rowsPerLoop = 160 $loopCnt = 0 loop_run: -print ================ client-07 start loop insert data +print ================ client-07 start loop insert data ( loop_cnt: $loop_cnt ) $i = $tblStart while $i < $tblEnd $tb = tb . $i - $c2Binary = $c2Binary . $i + $c2Binary = $preBinary . $i $c2Binary = $c2Binary . ' $x = 0 @@ -49,22 +49,22 @@ while $i < $tblEnd sql insert into $tb values ( $ts + 1a , $x , $c2Binary ) ( $ts + 3a , $x , $c2Binary ) ( $ts + 5a , $x , $c2Binary ) ( $ts + 7a , $x , $c2Binary ) ( $ts + 9a , $x , $c2Binary ) ( $ts + 11a , $x , $c2Binary ) ( $ts + 13a , $x , $c2Binary ) ( $ts + 15a , $x , $c2Binary ) ( $ts + 17a , $x , $c2Binary ) ( $ts + 19a , $x , $c2Binary ) ( $ts + 21a , $x , $c2Binary ) ( $ts + 23a , $x , $c2Binary ) ( $ts + 25a , $x , $c2Binary ) ( $ts + 27a , $x , $c2Binary ) ( $ts + 29a , $x , $c2Binary ) ( $ts + 31a , $x , $c2Binary ) ( $ts + 33a , $x , $c2Binary ) ( $ts + 35a , $x , $c2Binary ) ( $ts + 37a , $x , $c2Binary ) ( $ts + 39a , $x , $c2Binary ) $x = $x + 40 $ts = $ts + 40a - if $i == $tblStart then - $rowsPerTbl = $rowsPerTbl + $x - endi endw + if $i == $tblStart then + $rowsPerTbl = $rowsPerTbl + $x + endi $totalRows = $totalRows + $x $i = $i + 1 endw -sql select count(*) from $tblStart +sql select count(*) from $tb +print data00 $data00 rowsPerTbl $rowsPerTbl if $data00 != $rowsPerTbl then - print data00 $data00 rowsPerTbl $rowsPerTbl - print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - print ************ client-07 insert data error ***** ***** - print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + print ************ client-07 insert data into $tb error ***** ***** + print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ return -1 endi diff --git a/tests/script/unique/clusterSimCase/client-08.sim b/tests/script/unique/clusterSimCase/client-08.sim index 6316abb28e..e2814fdeac 100644 --- a/tests/script/unique/clusterSimCase/client-08.sim +++ b/tests/script/unique/clusterSimCase/client-08.sim @@ -6,7 +6,7 @@ $tblStart = 0 $tblEnd = 10000 $tsStart = 1325347200000 # 2012-01-01 00:00:00.000 -$c2Binary = ' . client-06- +$preBinary = ' . client-08- $numPerUpdateTbl = 2000 ############################################################### @@ -43,12 +43,12 @@ $rowsPerLoop = 40 $loopCnt = 0 loop_run: -print ================ client-06 start loop insert data +print ================ client-08 start loop insert data ( loop_cnt: $loop_cnt ) $i = $dropTblStart while $i < $tblEnd $tb = tb . $i - $c2Binary = $c2Binary . $i + $c2Binary = $preBinary . $i $c2Binary = $c2Binary . ' $x = 0 @@ -57,22 +57,22 @@ while $i < $tblEnd sql insert into $tb values ( $ts + 1a , $x , $c2Binary ) ( $ts + 3a , $x , $c2Binary ) ( $ts + 5a , $x , $c2Binary ) ( $ts + 7a , $x , $c2Binary ) ( $ts + 9a , $x , $c2Binary ) ( $ts + 11a , $x , $c2Binary ) ( $ts + 13a , $x , $c2Binary ) ( $ts + 15a , $x , $c2Binary ) ( $ts + 17a , $x , $c2Binary ) ( $ts + 19a , $x , $c2Binary ) ( $ts + 21a , $x , $c2Binary ) ( $ts + 23a , $x , $c2Binary ) ( $ts + 25a , $x , $c2Binary ) ( $ts + 27a , $x , $c2Binary ) ( $ts + 29a , $x , $c2Binary ) ( $ts + 31a , $x , $c2Binary ) ( $ts + 33a , $x , $c2Binary ) ( $ts + 35a , $x , $c2Binary ) ( $ts + 37a , $x , $c2Binary ) ( $ts + 39a , $x , $c2Binary ) $x = $x + 40 $ts = $ts + 40a - if $i == $tblStart then - $rowsPerTbl = $rowsPerTbl + $x - endi endw + if $i == $tblStart then + $rowsPerTbl = $rowsPerTbl + $x + endi $totalRows = $totalRows + $x $i = $i + 1 endw -sql select count(*) from $tblStart +sql select count(*) from $tb +print data00 $data00 rowsPerTbl $rowsPerTbl if $data00 != $rowsPerTbl then - print data00 $data00 rowsPerTbl $rowsPerTbl - print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - print ************ client-06 insert data error ***** ***** - print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + print ************ client-08 insert data into $tb error ***** ***** + print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ return -1 endi diff --git a/tests/script/unique/clusterSimCase/cluster_main.sim b/tests/script/unique/clusterSimCase/cluster_main.sim index e126463d53..a2ca34b189 100644 --- a/tests/script/unique/clusterSimCase/cluster_main.sim +++ b/tests/script/unique/clusterSimCase/cluster_main.sim @@ -91,14 +91,14 @@ sql create dnode $hostname3 sleep 3000 sleep 3000 print ============== step3: start back client-01.sim -run_back unique/clusterSimCase/client-01.sim -#run_back unique/clusterSimCase/client-01.sim -#run_back unique/clusterSimCase/client-01.sim -#run_back unique/clusterSimCase/client-01.sim -#run_back unique/clusterSimCase/client-01.sim -#run_back unique/clusterSimCase/client-01.sim -#run_back unique/clusterSimCase/client-01.sim #run_back unique/clusterSimCase/client-01.sim +#run_back unique/clusterSimCase/client-02.sim +#run_back unique/clusterSimCase/client-03.sim +run_back unique/clusterSimCase/client-04.sim +#run_back unique/clusterSimCase/client-05.sim +#run_back unique/clusterSimCase/client-06.sim +#run_back unique/clusterSimCase/client-07.sim +#run_back unique/clusterSimCase/client-08.sim #run_back unique/clusterSimCase/client-01.sim #run_back unique/clusterSimCase/client-01.sim sleep 20000 @@ -242,4 +242,7 @@ endi sleep 3000 print **** **** **** (loop_cnt: $loop_cnt ) end, continue...... **** **** **** **** $loop_cnt = $loop_cnt + 1 +if $loop_cnt == 50 then + return 0 +endi goto loop_cluster_do From b061ab88c2ec17c133b9f5a310c7b667d6a4801a Mon Sep 17 00:00:00 2001 From: Hui Li Date: Wed, 29 Jul 2020 16:48:39 +0800 Subject: [PATCH 2/7] [modify cases] --- tests/script/unique/clusterSimCase/client-04.sim | 4 ++-- tests/script/unique/clusterSimCase/client-05.sim | 2 +- tests/script/unique/clusterSimCase/client-06.sim | 2 +- tests/script/unique/clusterSimCase/client-07.sim | 2 +- tests/script/unique/clusterSimCase/client-08.sim | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/script/unique/clusterSimCase/client-04.sim b/tests/script/unique/clusterSimCase/client-04.sim index 6a210904ec..5248e9d7bb 100644 --- a/tests/script/unique/clusterSimCase/client-04.sim +++ b/tests/script/unique/clusterSimCase/client-04.sim @@ -35,8 +35,8 @@ $rowsPerLoop = 160 $loopCnt = 0 -loop_run: -print ================ client-04 start loop insert data +loop_run: +print ================ client-04 start loop insert data ( loopCnt: $loopCnt ) $i = $tblStart while $i < $tblEnd $tb = tb . $i diff --git a/tests/script/unique/clusterSimCase/client-05.sim b/tests/script/unique/clusterSimCase/client-05.sim index 971558d443..fe3a246094 100644 --- a/tests/script/unique/clusterSimCase/client-05.sim +++ b/tests/script/unique/clusterSimCase/client-05.sim @@ -35,7 +35,7 @@ $rowsPerLoop = 160 $loopCnt = 0 loop_run: -print ================ client-05 start loop insert data ( loop_cnt: $loop_cnt ) +print ================ client-05 start loop insert data ( loopCnt: $loopCnt ) $i = $tblStart while $i < $tblEnd $tb = tb . $i diff --git a/tests/script/unique/clusterSimCase/client-06.sim b/tests/script/unique/clusterSimCase/client-06.sim index 43a88b5ddd..91c3c5f5e2 100644 --- a/tests/script/unique/clusterSimCase/client-06.sim +++ b/tests/script/unique/clusterSimCase/client-06.sim @@ -43,7 +43,7 @@ $rowsPerLoop = 160 $loopCnt = 0 loop_run: -print ================ client-06 start loop insert data +print ================ client-06 start loop insert data ( loopCnt: $loopCnt ) $i = $dropTblStart while $i < $tblEnd $tb = tb . $i diff --git a/tests/script/unique/clusterSimCase/client-07.sim b/tests/script/unique/clusterSimCase/client-07.sim index 66284d418b..0dde62248d 100644 --- a/tests/script/unique/clusterSimCase/client-07.sim +++ b/tests/script/unique/clusterSimCase/client-07.sim @@ -35,7 +35,7 @@ $rowsPerLoop = 160 $loopCnt = 0 loop_run: -print ================ client-07 start loop insert data ( loop_cnt: $loop_cnt ) +print ================ client-07 start loop insert data ( loopCnt: $loopCnt ) $i = $tblStart while $i < $tblEnd $tb = tb . $i diff --git a/tests/script/unique/clusterSimCase/client-08.sim b/tests/script/unique/clusterSimCase/client-08.sim index e2814fdeac..891b3991b6 100644 --- a/tests/script/unique/clusterSimCase/client-08.sim +++ b/tests/script/unique/clusterSimCase/client-08.sim @@ -43,7 +43,7 @@ $rowsPerLoop = 40 $loopCnt = 0 loop_run: -print ================ client-08 start loop insert data ( loop_cnt: $loop_cnt ) +print ================ client-08 start loop insert data ( loopCnt: $loopCnt ) $i = $dropTblStart while $i < $tblEnd $tb = tb . $i From c3eb96f0471014811f94b944a1ba943992d70a53 Mon Sep 17 00:00:00 2001 From: Hui Li Date: Wed, 29 Jul 2020 17:15:40 +0800 Subject: [PATCH 3/7] [modify cases] --- tests/script/unique/clusterSimCase/client-05.sim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/script/unique/clusterSimCase/client-05.sim b/tests/script/unique/clusterSimCase/client-05.sim index fe3a246094..a2deaba9b2 100644 --- a/tests/script/unique/clusterSimCase/client-05.sim +++ b/tests/script/unique/clusterSimCase/client-05.sim @@ -40,7 +40,7 @@ $i = $tblStart while $i < $tblEnd $tb = tb . $i - $c2Binary = $c2Binary . $i + $c2Binary = $preBinary . $i $c2Binary = $c2Binary . ' $x = 0 From 489442416a96833c4bde2aed6464857ca5d5a0f3 Mon Sep 17 00:00:00 2001 From: Hui Li Date: Wed, 29 Jul 2020 18:13:21 +0800 Subject: [PATCH 4/7] [modify cases] --- .../script/unique/clusterSimCase/client-06.sim | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/tests/script/unique/clusterSimCase/client-06.sim b/tests/script/unique/clusterSimCase/client-06.sim index 91c3c5f5e2..6ef5b6fe2f 100644 --- a/tests/script/unique/clusterSimCase/client-06.sim +++ b/tests/script/unique/clusterSimCase/client-06.sim @@ -10,7 +10,9 @@ $preBinary = ' . client-06- $numPerUpdateTbl = 2000 ############################################################### -$totalRows = 0 +$totalRows = 0 +$dropTblStart = $tblStart +$dropTblEnd = $dropTblStart + $numPerUpdateTbl sql connect @@ -20,7 +22,7 @@ sql create database if not exists $db replica 2 sql use $db init_lable: -print ================ create table $tb (ts timestamp, c1 int, c2 binary(16)) +print ================ create table $tb[from $tblStart to $tblEnd] (ts timestamp, c1 int, c2 binary(16)) $i = $tblStart while $i < $tblEnd @@ -30,8 +32,8 @@ while $i < $tblEnd $i = $i + 1 endw -$dropTblStart = $tblStart -$dropTblEnd = $tblStart + $numPerUpdateTbl +$dropTblStart = $dropTblEnd +$dropTblEnd = $dropTblStart + $numPerUpdateTbl $tblStart = $tblEnd $tblEnd = $tblEnd + $numPerUpdateTbl @@ -44,8 +46,8 @@ $loopCnt = 0 loop_run: print ================ client-06 start loop insert data ( loopCnt: $loopCnt ) -$i = $dropTblStart -while $i < $tblEnd +$i = $dropTblStart +while $i < $tblStart $tb = tb . $i $c2Binary = $preBinary . $i @@ -78,8 +80,8 @@ endi $loopCnt = $loopCnt + 1 -if $loopCnt > 100 then - +if $loopCnt > 5 then + print ================ client-06 drop table from $dropTblStart to $dropTblEnd $i = $dropTblStart while $i < $dropTblEnd $tb = tb . $i From 611efb3f877ed894ddbad56aa37dcab3a9e78920 Mon Sep 17 00:00:00 2001 From: Hui Li Date: Wed, 29 Jul 2020 18:18:28 +0800 Subject: [PATCH 5/7] [modify cases] --- tests/script/unique/clusterSimCase/client-06.sim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/script/unique/clusterSimCase/client-06.sim b/tests/script/unique/clusterSimCase/client-06.sim index 6ef5b6fe2f..d39c962a81 100644 --- a/tests/script/unique/clusterSimCase/client-06.sim +++ b/tests/script/unique/clusterSimCase/client-06.sim @@ -22,7 +22,7 @@ sql create database if not exists $db replica 2 sql use $db init_lable: -print ================ create table $tb[from $tblStart to $tblEnd] (ts timestamp, c1 int, c2 binary(16)) +print ================ create table $tb [ from $tblStart to $tblEnd ] (ts timestamp, c1 int, c2 binary(16)) $i = $tblStart while $i < $tblEnd From ea0163b3b43a83757e731560b59d4ef7003a80fd Mon Sep 17 00:00:00 2001 From: Hui Li Date: Wed, 29 Jul 2020 18:21:20 +0800 Subject: [PATCH 6/7] [modify cases] --- tests/script/unique/clusterSimCase/client-06.sim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/script/unique/clusterSimCase/client-06.sim b/tests/script/unique/clusterSimCase/client-06.sim index d39c962a81..488534ded0 100644 --- a/tests/script/unique/clusterSimCase/client-06.sim +++ b/tests/script/unique/clusterSimCase/client-06.sim @@ -60,7 +60,7 @@ while $i < $tblStart $x = $x + 40 $ts = $ts + 40a endw - if $i == $tblStart then + if $i == $dropTblStart then $rowsPerTbl = $rowsPerTbl + $x endi From 13c041a22c9447e2d672d1034b13e3982064fbe9 Mon Sep 17 00:00:00 2001 From: Hui Li Date: Wed, 29 Jul 2020 18:32:33 +0800 Subject: [PATCH 7/7] [modify cases] --- tests/script/unique/clusterSimCase/client-06.sim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/script/unique/clusterSimCase/client-06.sim b/tests/script/unique/clusterSimCase/client-06.sim index 488534ded0..4238a93cf0 100644 --- a/tests/script/unique/clusterSimCase/client-06.sim +++ b/tests/script/unique/clusterSimCase/client-06.sim @@ -12,7 +12,7 @@ $numPerUpdateTbl = 2000 $totalRows = 0 $dropTblStart = $tblStart -$dropTblEnd = $dropTblStart + $numPerUpdateTbl +$dropTblEnd = $dropTblStart sql connect @@ -45,7 +45,7 @@ $rowsPerLoop = 160 $loopCnt = 0 loop_run: -print ================ client-06 start loop insert data ( loopCnt: $loopCnt ) +print ================ client-06 start loop insert data from $dropTblStart to $tblStart ( loopCnt: $loopCnt ) $i = $dropTblStart while $i < $tblStart $tb = tb . $i @@ -80,7 +80,7 @@ endi $loopCnt = $loopCnt + 1 -if $loopCnt > 5 then +if $loopCnt > 2 then print ================ client-06 drop table from $dropTblStart to $dropTblEnd $i = $dropTblStart while $i < $dropTblEnd