fix:modify tsim cases for msg number

This commit is contained in:
wangmm0220 2023-04-04 15:57:27 +08:00
parent 1d7581f660
commit ed53b9827a
10 changed files with 168 additions and 168 deletions

View File

@ -94,7 +94,7 @@
,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDropStbCtb.py ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDropStbCtb.py
,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDropNtb-snapshot0.py ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDropNtb-snapshot0.py
,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDropNtb-snapshot1.py ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqDropNtb-snapshot1.py
,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUdf.py #,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUdf.py
,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUdf-multCtb-snapshot0.py ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUdf-multCtb-snapshot0.py
,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUdf-multCtb-snapshot1.py ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqUdf-multCtb-snapshot1.py
,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/stbTagFilter-1ctb.py ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/stbTagFilter-1ctb.py

View File

@ -111,8 +111,8 @@ endi
$consumerId = 0 $consumerId = 0
$totalMsgOfStb = $ctbNum * $rowsPerCtb $totalMsgOfStb = $ctbNum * $rowsPerCtb
$expectmsgcnt = $totalMsgOfStb $expectmsgcnt = 1
sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfStb , $ifcheckdata , $ifmanualcommit )
print == start consumer to pull msgs from stb print == start consumer to pull msgs from stb
print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -w $cdbName -s start print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -w $cdbName -s start
@ -134,7 +134,7 @@ if $data[0][2] != $expectmsgcnt then
print expect $expectmsgcnt , actual $data02 print expect $expectmsgcnt , actual $data02
return -1 return -1
endi endi
if $data[0][3] != $expectmsgcnt then if $data[0][3] != $totalMsgOfStb then
return -1 return -1
endi endi
$loop_cnt = $loop_cnt + 1 $loop_cnt = $loop_cnt + 1
@ -183,8 +183,8 @@ endi
$consumerId = 0 $consumerId = 0
$totalMsgOfCtb = $rowsPerCtb $totalMsgOfCtb = $rowsPerCtb
$expectmsgcnt = $totalMsgOfCtb $expectmsgcnt = 1
sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfCtb , $ifcheckdata , $ifmanualcommit )
print == start consumer to pull msgs from ctb print == start consumer to pull msgs from ctb
print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start
@ -202,7 +202,7 @@ endi
if $data[0][1] != $consumerId then if $data[0][1] != $consumerId then
return -1 return -1
endi endi
if $data[0][2] != $totalMsgOfCtb then if $data[0][2] != $expectmsgcnt then
return -1 return -1
endi endi
if $data[0][3] != $totalMsgOfCtb then if $data[0][3] != $totalMsgOfCtb then
@ -254,8 +254,8 @@ endi
$consumerId = 0 $consumerId = 0
$totalMsgOfNtb = $rowsPerCtb $totalMsgOfNtb = $rowsPerCtb
$expectmsgcnt = $totalMsgOfNtb $expectmsgcnt = 1
sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfNtb , $ifcheckdata , $ifmanualcommit )
print == start consumer to pull msgs from ntb print == start consumer to pull msgs from ntb
print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start
@ -273,7 +273,7 @@ endi
if $data[0][1] != $consumerId then if $data[0][1] != $consumerId then
return -1 return -1
endi endi
if $data[0][2] != $totalMsgOfNtb then if $data[0][2] != $expectmsgcnt then
return -1 return -1
endi endi
if $data[0][3] != $totalMsgOfNtb then if $data[0][3] != $totalMsgOfNtb then

View File

@ -111,11 +111,11 @@ endi
$consumerId = 0 $consumerId = 0
$totalMsgOfStb = $ctbNum * $rowsPerCtb $totalMsgOfStb = $ctbNum * $rowsPerCtb
$expectmsgcnt = $totalMsgOfStb $expectmsgcnt = 1
sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfStb , $ifcheckdata , $ifmanualcommit )
$consumerId = 1 $consumerId = 1
sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $totalMsgOfStb , $ifcheckdata , $ifmanualcommit )
print == start consumer to pull msgs from stb print == start consumer to pull msgs from stb
print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -w $cdbName -s start print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -w $cdbName -s start
@ -142,14 +142,14 @@ if $data[0][1] == 1 then
endi endi
endi endi
# either $data[0][2] == $totalMsgOfStb and $data[1][2] == 0 # either $data[0][2] == $expectmsgcnt and $data[1][2] == 0
# or $data[0][2] == 0 and $data[1][2] == $totalMsgOfStb # or $data[0][2] == 0 and $data[1][2] == $expectmsgcnt
if $data[0][2] == $totalMsgOfStb then if $data[0][2] == $expectmsgcnt then
if $data[1][2] == 0 then if $data[1][2] == 0 then
goto check_ok_0 goto check_ok_0
endi endi
elif $data[0][2] == 0 then elif $data[0][2] == 0 then
if $data[1][2] == $totalMsgOfStb then if $data[1][2] == $expectmsgcnt then
goto check_ok_0 goto check_ok_0
endi endi
endi endi
@ -214,10 +214,10 @@ endi
$consumerId = 0 $consumerId = 0
$totalMsgOfCtb = $rowsPerCtb $totalMsgOfCtb = $rowsPerCtb
$expectmsgcnt = $totalMsgOfCtb $expectmsgcnt = 1
sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfCtb , $ifcheckdata , $ifmanualcommit )
$consumerId = 1 $consumerId = 1
sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $totalMsgOfCtb , $ifcheckdata , $ifmanualcommit )
print == start consumer to pull msgs from ctb print == start consumer to pull msgs from ctb
print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start
@ -244,14 +244,14 @@ if $data[0][1] == 1 then
endi endi
endi endi
# either $data[0][2] == $totalMsgOfCtb and $data[1][2] == 0 # either $data[0][2] == $expectmsgcnt and $data[1][2] == 0
# or $data[0][2] == 0 and $data[1][2] == $totalMsgOfCtb # or $data[0][2] == 0 and $data[1][2] == $expectmsgcnt
if $data[0][2] == $totalMsgOfCtb then if $data[0][2] == $expectmsgcnt then
if $data[1][2] == 0 then if $data[1][2] == 0 then
goto check_ok_2 goto check_ok_2
endi endi
elif $data[0][2] == 0 then elif $data[0][2] == 0 then
if $data[1][2] == $totalMsgOfCtb then if $data[1][2] == $expectmsgcnt then
goto check_ok_2 goto check_ok_2
endi endi
endi endi
@ -316,10 +316,10 @@ endi
$consumerId = 0 $consumerId = 0
$totalMsgOfNtb = $rowsPerCtb $totalMsgOfNtb = $rowsPerCtb
$expectmsgcnt = $totalMsgOfNtb $expectmsgcnt = 1
sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfNtb , $ifcheckdata , $ifmanualcommit )
$consumerId = 1 $consumerId = 1
sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $totalMsgOfNtb , $ifcheckdata , $ifmanualcommit )
print == start consumer to pull msgs from ntb print == start consumer to pull msgs from ntb
print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start
@ -346,14 +346,14 @@ if $data[1][1] == 0 then
endi endi
endi endi
# either $data[0][2] == $totalMsgOfNtb and $data[1][2] == 0 # either $data[0][2] == $expectmsgcnt and $data[1][2] == 0
# or $data[0][2] == 0 and $data[1][2] == $totalMsgOfNtb # or $data[0][2] == 0 and $data[1][2] == $expectmsgcnt
if $data[0][2] == $totalMsgOfNtb then if $data[0][2] == $expectmsgcnt then
if $data[1][2] == 0 then if $data[1][2] == 0 then
goto check_ok_4 goto check_ok_4
endi endi
elif $data[0][2] == 0 then elif $data[0][2] == 0 then
if $data[1][2] == $totalMsgOfNtb then if $data[1][2] == $expectmsgcnt then
goto check_ok_4 goto check_ok_4
endi endi
endi endi

View File

@ -83,8 +83,8 @@ $topicList = $topicList . '
$consumerId = 0 $consumerId = 0
$totalMsgOfStb = $ctbNum * $rowsPerCtb $totalMsgOfStb = $ctbNum * $rowsPerCtb
$totalMsgOfStb = $totalMsgOfStb * $topicNum $totalMsgOfStb = $totalMsgOfStb * $topicNum
$expectmsgcnt = $totalMsgOfStb $expectmsgcnt = $topicNum
sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfStb , $ifcheckdata , $ifmanualcommit )
print == start consumer to pull msgs from stb print == start consumer to pull msgs from stb
print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -w $dbName -s start print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -w $dbName -s start
@ -105,7 +105,7 @@ endi
if $data[0][2] != $expectmsgcnt then if $data[0][2] != $expectmsgcnt then
return -1 return -1
endi endi
if $data[0][3] != $expectmsgcnt then if $data[0][3] != $totalMsgOfStb then
return -1 return -1
endi endi
@ -140,8 +140,8 @@ $topicList = $topicList . '
$consumerId = 0 $consumerId = 0
$totalMsgOfCtb = $rowsPerCtb * $topicNum $totalMsgOfCtb = $rowsPerCtb * $topicNum
$expectmsgcnt = $totalMsgOfCtb $expectmsgcnt = $topicNum
sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfCtb , $ifcheckdata , $ifmanualcommit )
print == start consumer to pull msgs from ctb print == start consumer to pull msgs from ctb
print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start
@ -159,7 +159,7 @@ endi
if $data[0][1] != $consumerId then if $data[0][1] != $consumerId then
return -1 return -1
endi endi
if $data[0][2] != $totalMsgOfCtb then if $data[0][2] != $expectmsgcnt then
return -1 return -1
endi endi
if $data[0][3] != $totalMsgOfCtb then if $data[0][3] != $totalMsgOfCtb then
@ -197,8 +197,8 @@ $topicList = $topicList . '
$consumerId = 0 $consumerId = 0
$totalMsgOfNtb = $rowsPerCtb * $topicNum $totalMsgOfNtb = $rowsPerCtb * $topicNum
$expectmsgcnt = $totalMsgOfNtb $expectmsgcnt = $topicNum
sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfNtb , $ifcheckdata , $ifmanualcommit )
print == start consumer to pull msgs from ntb print == start consumer to pull msgs from ntb
print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start
@ -216,7 +216,7 @@ endi
if $data[0][1] != $consumerId then if $data[0][1] != $consumerId then
return -1 return -1
endi endi
if $data[0][2] != $totalMsgOfNtb then if $data[0][2] != $expectmsgcnt then
return -1 return -1
endi endi
if $data[0][3] != $totalMsgOfNtb then if $data[0][3] != $totalMsgOfNtb then

View File

@ -82,10 +82,10 @@ $topicList = $topicList . '
$consumerId = 0 $consumerId = 0
$totalMsgOfStb = $ctbNum * $rowsPerCtb $totalMsgOfStb = $ctbNum * $rowsPerCtb
$totalMsgOfStb = $totalMsgOfStb * $topicNum $totalMsgOfStb = $totalMsgOfStb * $topicNum
$expectmsgcnt = $totalMsgOfStb $expectmsgcnt = $topicNum
sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfStb , $ifcheckdata , $ifmanualcommit )
$consumerId = 1 $consumerId = 1
sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $totalMsgOfStb , $ifcheckdata , $ifmanualcommit )
print == start consumer to pull msgs from stb print == start consumer to pull msgs from stb
print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -w $dbName -s start print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -w $dbName -s start
@ -112,14 +112,14 @@ if $data[0][1] == 1 then
endi endi
endi endi
# either $data[0][2] == $totalMsgOfStb and $data[1][2] == 0 # either $data[0][2] == $expectmsgcnt and $data[1][2] == 0
# or $data[0][2] == 0 and $data[1][2] == $totalMsgOfStb # or $data[0][2] == 0 and $data[1][2] == $expectmsgcnt
if $data[0][2] == $totalMsgOfStb then if $data[0][2] == $expectmsgcnt then
if $data[1][2] == 0 then if $data[1][2] == 0 then
goto check_ok_0 goto check_ok_0
endi endi
elif $data[0][2] == 0 then elif $data[0][2] == 0 then
if $data[1][2] == $totalMsgOfStb then if $data[1][2] == $expectmsgcnt then
goto check_ok_0 goto check_ok_0
endi endi
endi endi
@ -169,10 +169,10 @@ $topicList = $topicList . '
$consumerId = 0 $consumerId = 0
$totalMsgOfCtb = $rowsPerCtb * $topicNum $totalMsgOfCtb = $rowsPerCtb * $topicNum
$expectmsgcnt = $totalMsgOfCtb $expectmsgcnt = $topicNum
sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfCtb , $ifcheckdata , $ifmanualcommit )
$consumerId = 1 $consumerId = 1
sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $totalMsgOfCtb , $ifcheckdata , $ifmanualcommit )
print == start consumer to pull msgs from ctb print == start consumer to pull msgs from ctb
print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start
@ -199,14 +199,14 @@ if $data[0][1] == 1 then
endi endi
endi endi
# either $data[0][2] == $totalMsgOfCtb and $data[1][2] == 0 # either $data[0][2] == $expectmsgcnt and $data[1][2] == 0
# or $data[0][2] == 0 and $data[1][2] == $totalMsgOfCtb # or $data[0][2] == 0 and $data[1][2] == $expectmsgcnt
if $data[0][2] == $totalMsgOfCtb then if $data[0][2] == $expectmsgcnt then
if $data[1][2] == 0 then if $data[1][2] == 0 then
goto check_ok_2 goto check_ok_2
endi endi
elif $data[0][2] == 0 then elif $data[0][2] == 0 then
if $data[1][2] == $totalMsgOfCtb then if $data[1][2] == $expectmsgcnt then
goto check_ok_2 goto check_ok_2
endi endi
endi endi
@ -256,10 +256,10 @@ $topicList = $topicList . '
$consumerId = 0 $consumerId = 0
$totalMsgOfNtb = $rowsPerCtb * $topicNum $totalMsgOfNtb = $rowsPerCtb * $topicNum
$expectmsgcnt = $totalMsgOfNtb $expectmsgcnt = $topicNum
sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfNtb , $ifcheckdata , $ifmanualcommit )
$consumerId = 1 $consumerId = 1
sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $totalMsgOfNtb , $ifcheckdata , $ifmanualcommit )
print == start consumer to pull msgs from ntb print == start consumer to pull msgs from ntb
print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start
@ -286,14 +286,14 @@ if $data[1][1] == 0 then
endi endi
endi endi
# either $data[0][2] == $totalMsgOfNtb and $data[1][2] == 0 # either $data[0][2] == $expectmsgcnt and $data[1][2] == 0
# or $data[0][2] == 0 and $data[1][2] == $totalMsgOfNtb # or $data[0][2] == 0 and $data[1][2] == $expectmsgcnt
if $data[0][2] == $totalMsgOfNtb then if $data[0][2] == $expectmsgcnt then
if $data[1][2] == 0 then if $data[1][2] == 0 then
goto check_ok_4 goto check_ok_4
endi endi
elif $data[0][2] == 0 then elif $data[0][2] == 0 then
if $data[1][2] == $totalMsgOfNtb then if $data[1][2] == $expectmsgcnt then
goto check_ok_4 goto check_ok_4
endi endi
endi endi

View File

@ -80,8 +80,8 @@ $topicList = $topicList . '
$consumerId = 0 $consumerId = 0
$totalMsgOfOneTopic = $ctbNum * $rowsPerCtb $totalMsgOfOneTopic = $ctbNum * $rowsPerCtb
$totalMsgOfStb = $totalMsgOfOneTopic * $topicNum $totalMsgOfStb = $totalMsgOfOneTopic * $topicNum
$expectmsgcnt = $totalMsgOfStb $expectmsgcnt = 3
sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfStb , $ifcheckdata , $ifmanualcommit )
$topicList = ' . topic_stb_all $topicList = ' . topic_stb_all
@ -89,7 +89,7 @@ $topicList = $topicList . ,
$topicList = $topicList . topic_stb_function $topicList = $topicList . topic_stb_function
$topicList = $topicList . ' $topicList = $topicList . '
$consumerId = 1 $consumerId = 1
sql insert into consumeinfo values (now +1s , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) sql insert into consumeinfo values (now +1s , $consumerId , $topicList , $keyList , $totalMsgOfStb , $ifcheckdata , $ifmanualcommit )
print == start consumer to pull msgs from stb print == start consumer to pull msgs from stb
print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -w $dbName -s start print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -w $dbName -s start
@ -118,40 +118,40 @@ endi
# $data[0][2]/$data[1][2] should be between $totalMsgOfOneTopic and $totalMsgOfStb. # $data[0][2]/$data[1][2] should be between $totalMsgOfOneTopic and $totalMsgOfStb.
if $data[0][2] < $totalMsgOfOneTopic then #if $data[0][2] < $totalMsgOfOneTopic then
# return -1
#endi
if $data[0][2] > $expectmsgcnt then
return -1 return -1
endi endi
if $data[0][2] > $totalMsgOfStb then #if $data[1][2] < $totalMsgOfOneTopic then
return -1 # return -1
endi #endi
if $data[1][2] < $totalMsgOfOneTopic then if $data[1][2] > $expectmsgcnt then
return -1
endi
if $data[1][2] > $totalMsgOfStb then
return -1 return -1
endi endi
$totalMsgCons = $totalMsgOfOneTopic + $totalMsgOfStb #$totalMsgCons = $totalMsgOfOneTopic + $totalMsgOfStb
$sumOfMsgCnt = $data[0][2] + $data[1][2] $sumOfMsgCnt = $data[0][2] + $data[1][2]
if $sumOfMsgCnt != $totalMsgCons then if $sumOfMsgCnt != $expectmsgcnt then
print total: $totalMsgCons print total: $expectmsgcnt
print sum: $sumOfMsgCnt print sum: $sumOfMsgCnt
return -1 return -1
endi endi
# $data[0][3]/$data[1][3] should be between $totalMsgOfOneTopic and $totalMsgOfStb. # $data[0][3]/$data[1][3] should be between $totalMsgOfOneTopic and $totalMsgOfStb.
if $data[0][3] < $totalMsgOfOneTopic then #if $data[0][3] < $totalMsgOfStb then
return -1 # return -1
endi #endi
if $data[0][3] > $totalMsgOfStb then #if $data[0][3] > $totalMsgOfStb then
return -1 # return -1
endi #endi
if $data[1][3] < $totalMsgOfOneTopic then #if $data[1][3] < $totalMsgOfStb then
return -1 # return -1
endi #endi
if $data[1][3] > $totalMsgOfStb then #if $data[1][3] > $totalMsgOfStb then
return -1 # return -1
endi #endi
$totalMsgCons = $totalMsgOfOneTopic + $totalMsgOfStb $totalMsgCons = $totalMsgOfOneTopic + $totalMsgOfStb
$sumOfRows = $data[0][3] + $data[1][3] $sumOfRows = $data[0][3] + $data[1][3]
@ -189,15 +189,15 @@ $consumerId = 0
$totalMsgOfOneTopic = $rowsPerCtb $totalMsgOfOneTopic = $rowsPerCtb
$totalMsgOfCtb = $totalMsgOfOneTopic * $topicNum $totalMsgOfCtb = $totalMsgOfOneTopic * $topicNum
$expectmsgcnt = $totalMsgOfCtb $expectmsgcnt = $topicNum
sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfCtb , $ifcheckdata , $ifmanualcommit )
$topicList = ' . topic_ctb_function $topicList = ' . topic_ctb_function
$topicList = $topicList . , $topicList = $topicList . ,
$topicList = $topicList . topic_ctb_all $topicList = $topicList . topic_ctb_all
$topicList = $topicList . ' $topicList = $topicList . '
$consumerId = 1 $consumerId = 1
sql insert into consumeinfo values (now +1s, $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) sql insert into consumeinfo values (now +1s, $consumerId , $topicList , $keyList , $totalMsgOfCtb , $ifcheckdata , $ifmanualcommit )
print == start consumer to pull msgs from ctb print == start consumer to pull msgs from ctb
print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -w $cdbName -s start print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -w $cdbName -s start
@ -226,24 +226,24 @@ endi
# either $data[0][2] $totalMsgOfOneTopic and $data[1][2] == $totalMsgOfCtb # either $data[0][2] $totalMsgOfOneTopic and $data[1][2] == $totalMsgOfCtb
# or $data[0][2] $totalMsgOfCtb and $data[1][2] == $totalMsgOfOneTopic # or $data[0][2] $totalMsgOfCtb and $data[1][2] == $totalMsgOfOneTopic
if $data[0][2] == $totalMsgOfOneTopic then if $data[0][2] == $topicNum then
if $data[1][2] == $totalMsgOfCtb then if $data[1][2] == 1 then
goto check_ok_0 goto check_ok_0
endi endi
elif $data[1][2] == $totalMsgOfOneTopic then elif $data[0][2] == 1 then
if $data[0][2] == $totalMsgOfCtb then if $data[1][2] == $topicNum then
goto check_ok_0 goto check_ok_0
endi endi
endi endi
return -1 return -1
check_ok_0: check_ok_0:
if $data[0][3] == $totalMsgOfOneTopic then if $data[0][3] == $totalMsgOfCtb then
if $data[1][3] == $totalMsgOfCtb then if $data[1][3] == $totalMsgOfOneTopic then
goto check_ok_1 goto check_ok_1
endi endi
elif $data[1][3] == $totalMsgOfOneTopic then elif $data[0][3] == $totalMsgOfOneTopic then
if $data[0][3] == $totalMsgOfCtb then if $data[1][3] == $totalMsgOfCtb then
goto check_ok_1 goto check_ok_1
endi endi
endi endi
@ -280,8 +280,8 @@ $topicList = $topicList . '
$consumerId = 0 $consumerId = 0
$totalMsgOfOneTopic = $rowsPerCtb $totalMsgOfOneTopic = $rowsPerCtb
$totalMsgOfNtb = $totalMsgOfOneTopic * $topicNum $totalMsgOfNtb = $totalMsgOfOneTopic * $topicNum
$expectmsgcnt = $totalMsgOfNtb $expectmsgcnt = $topicNum
sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfNtb , $ifcheckdata , $ifmanualcommit )
$topicList = ' . topic_ntb_function $topicList = ' . topic_ntb_function
@ -289,7 +289,7 @@ $topicList = $topicList . ,
$topicList = $topicList . topic_ntb_all $topicList = $topicList . topic_ntb_all
$topicList = $topicList . ' $topicList = $topicList . '
$consumerId = 1 $consumerId = 1
sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $totalMsgOfNtb , $ifcheckdata , $ifmanualcommit )
print == start consumer to pull msgs from ntb print == start consumer to pull msgs from ntb
print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start
@ -318,12 +318,12 @@ endi
# either $data[0][2] $totalMsgOfOneTopic and $data[1][2] == $totalMsgOfNtb # either $data[0][2] $totalMsgOfOneTopic and $data[1][2] == $totalMsgOfNtb
# or $data[0][2] $totalMsgOfNtb and $data[1][2] == $totalMsgOfOneTopic # or $data[0][2] $totalMsgOfNtb and $data[1][2] == $totalMsgOfOneTopic
if $data[0][2] == $totalMsgOfOneTopic then if $data[0][2] == $expectmsgcnt then
if $data[1][2] == $totalMsgOfNtb then if $data[1][2] == 1 then
goto check_ok_2 goto check_ok_2
endi endi
elif $data[1][2] == $totalMsgOfOneTopic then elif $data[0][2] == 1 then
if $data[0][2] == $totalMsgOfNtb then if $data[1][2] == $expectmsgcnt then
goto check_ok_2 goto check_ok_2
endi endi
endi endi
@ -334,8 +334,8 @@ if $data[0][3] == $totalMsgOfOneTopic then
if $data[1][3] == $totalMsgOfNtb then if $data[1][3] == $totalMsgOfNtb then
goto check_ok_3 goto check_ok_3
endi endi
elif $data[1][3] == $totalMsgOfOneTopic then elif $data[0][3] == $totalMsgOfNtb then
if $data[0][3] == $totalMsgOfNtb then if $data[1][3] == $totalMsgOfOneTopic then
goto check_ok_3 goto check_ok_3
endi endi
endi endi

View File

@ -111,8 +111,8 @@ endi
$consumerId = 0 $consumerId = 0
$totalMsgOfStb = $ctbNum * $rowsPerCtb $totalMsgOfStb = $ctbNum * $rowsPerCtb
$expectmsgcnt = $totalMsgOfStb $expectmsgcnt = 1
sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfStb , $ifcheckdata , $ifmanualcommit )
print == start consumer to pull msgs from stb print == start consumer to pull msgs from stb
print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -w $cdbName -s start print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -w $cdbName -s start
@ -130,10 +130,10 @@ endi
if $data[0][1] != $consumerId then if $data[0][1] != $consumerId then
return -1 return -1
endi endi
if $data[0][2] != $expectmsgcnt then #if $data[0][2] != $expectmsgcnt then
return -1 # return -1
endi #endi
if $data[0][3] != $expectmsgcnt then if $data[0][3] != $totalMsgOfStb then
return -1 return -1
endi endi
$loop_cnt = $loop_cnt + 1 $loop_cnt = $loop_cnt + 1
@ -182,8 +182,8 @@ endi
$consumerId = 0 $consumerId = 0
$totalMsgOfCtb = $rowsPerCtb $totalMsgOfCtb = $rowsPerCtb
$expectmsgcnt = $totalMsgOfCtb $expectmsgcnt = 1
sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfCtb , $ifcheckdata , $ifmanualcommit )
print == start consumer to pull msgs from ctb print == start consumer to pull msgs from ctb
print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start
@ -201,7 +201,7 @@ endi
if $data[0][1] != $consumerId then if $data[0][1] != $consumerId then
return -1 return -1
endi endi
if $data[0][2] != $totalMsgOfCtb then if $data[0][2] != $expectmsgcnt then
return -1 return -1
endi endi
if $data[0][3] != $totalMsgOfCtb then if $data[0][3] != $totalMsgOfCtb then
@ -253,8 +253,8 @@ endi
$consumerId = 0 $consumerId = 0
$totalMsgOfNtb = $rowsPerCtb $totalMsgOfNtb = $rowsPerCtb
$expectmsgcnt = $totalMsgOfNtb $expectmsgcnt = 1
sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfNtb , $ifcheckdata , $ifmanualcommit )
print == start consumer to pull msgs from ntb print == start consumer to pull msgs from ntb
print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start
@ -272,7 +272,7 @@ endi
if $data[0][1] != $consumerId then if $data[0][1] != $consumerId then
return -1 return -1
endi endi
if $data[0][2] != $totalMsgOfNtb then if $data[0][2] != $expectmsgcnt then
return -1 return -1
endi endi
if $data[0][3] != $totalMsgOfNtb then if $data[0][3] != $totalMsgOfNtb then

View File

@ -110,10 +110,10 @@ endi
$consumerId = 0 $consumerId = 0
$totalMsgOfStb = $ctbNum * $rowsPerCtb $totalMsgOfStb = $ctbNum * $rowsPerCtb
$expectmsgcnt = $totalMsgOfStb $expectmsgcnt = 3
sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfStb , $ifcheckdata , $ifmanualcommit )
$consumerId = 1 $consumerId = 1
sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $totalMsgOfStb , $ifcheckdata , $ifmanualcommit )
print == start consumer to pull msgs from stb print == start consumer to pull msgs from stb
print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -w $cdbName -s start print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -w $cdbName -s start
@ -163,19 +163,19 @@ endi
if $data[0][3] <= 0 then if $data[0][3] <= 0 then
return -1 return -1
endi endi
if $data[0][3] >= $expectmsgcnt then if $data[0][3] >= $totalMsgOfStb then
return -1 return -1
endi endi
if $data[1][3] <= 0 then if $data[1][3] <= 0 then
return -1 return -1
endi endi
if $data[1][3] >= $expectmsgcnt then if $data[1][3] >= $totalMsgOfStb then
return -1 return -1
endi endi
$sumOfMsgRows = $data[0][3] + $data[1][3] $sumOfMsgRows = $data[0][3] + $data[1][3]
if $sumOfMsgRows != $expectmsgcnt then if $sumOfMsgRows != $totalMsgOfStb then
return -1 return -1
endi endi
@ -225,10 +225,10 @@ endi
$consumerId = 0 $consumerId = 0
$totalMsgOfCtb = $rowsPerCtb $totalMsgOfCtb = $rowsPerCtb
$expectmsgcnt = $totalMsgOfCtb $expectmsgcnt = 1
sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfCtb , $ifcheckdata , $ifmanualcommit )
$consumerId = 1 $consumerId = 1
sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $totalMsgOfCtb , $ifcheckdata , $ifmanualcommit )
print == start consumer to pull msgs from ctb print == start consumer to pull msgs from ctb
print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start
@ -255,13 +255,13 @@ if $data[0][1] == 1 then
endi endi
endi endi
# either $data[0][2] == $totalMsgOfCtb and $data[1][2] == 0 # either $data[0][2] == $expectmsgcnt and $data[1][2] == 0
# or $data[0][2] == 0 and $data[1][2] == $totalMsgOfCtb # or $data[0][2] == 0 and $data[1][2] == $expectmsgcnt
if $data[0][2] == $totalMsgOfCtb then if $data[0][2] == $expectmsgcnt then
if $data[1][2] == 0 then if $data[1][2] == 0 then
goto check_ok_0 goto check_ok_0
endi endi
elif $data[1][2] == $totalMsgOfCtb then elif $data[1][2] == $expectmsgcnt then
if $data[0][2] == 0 then if $data[0][2] == 0 then
goto check_ok_0 goto check_ok_0
endi endi
@ -327,10 +327,10 @@ endi
$consumerId = 0 $consumerId = 0
$totalMsgOfNtb = $rowsPerCtb $totalMsgOfNtb = $rowsPerCtb
$expectmsgcnt = $totalMsgOfNtb $expectmsgcnt = 1
sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfNtb , $ifcheckdata , $ifmanualcommit )
$consumerId = 1 $consumerId = 1
sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $totalMsgOfNtb , $ifcheckdata , $ifmanualcommit )
print == start consumer to pull msgs from ntb print == start consumer to pull msgs from ntb
print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start
@ -357,13 +357,13 @@ if $data[1][1] == 0 then
endi endi
endi endi
# either $data[0][2] == $totalMsgOfNtb and $data[1][2] == 0 # either $data[0][2] == $expectmsgcnt and $data[1][2] == 0
# or $data[0][2] == 0 and $data[1][2] == $totalMsgOfNtb # or $data[0][2] == 0 and $data[1][2] == $expectmsgcnt
if $data[0][2] == $totalMsgOfNtb then if $data[0][2] == $expectmsgcnt then
if $data[1][2] == 0 then if $data[1][2] == 0 then
goto check_ok_2 goto check_ok_2
endi endi
elif $data[1][2] == $totalMsgOfNtb then elif $data[1][2] == $expectmsgcnt then
if $data[0][2] == 0 then if $data[0][2] == 0 then
goto check_ok_2 goto check_ok_2
endi endi

View File

@ -80,8 +80,8 @@ $topicList = $topicList . '
$consumerId = 0 $consumerId = 0
$totalMsgOfStb = $ctbNum * $rowsPerCtb $totalMsgOfStb = $ctbNum * $rowsPerCtb
$totalMsgOfStb = $totalMsgOfStb * $topicNum $totalMsgOfStb = $totalMsgOfStb * $topicNum
$expectmsgcnt = $totalMsgOfStb $expectmsgcnt = 9
sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfStb , $ifcheckdata , $ifmanualcommit )
print == start consumer to pull msgs from stb print == start consumer to pull msgs from stb
print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -w $dbName -s start print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -w $dbName -s start
@ -102,7 +102,7 @@ endi
if $data[0][2] != $expectmsgcnt then if $data[0][2] != $expectmsgcnt then
return -1 return -1
endi endi
if $data[0][3] != $expectmsgcnt then if $data[0][3] != $totalMsgOfStb then
return -1 return -1
endi endi
@ -137,8 +137,8 @@ $topicList = $topicList . '
$consumerId = 0 $consumerId = 0
$totalMsgOfCtb = $rowsPerCtb * $topicNum $totalMsgOfCtb = $rowsPerCtb * $topicNum
$expectmsgcnt = $totalMsgOfCtb $expectmsgcnt = $topicNum
sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfCtb , $ifcheckdata , $ifmanualcommit )
print == start consumer to pull msgs from ctb print == start consumer to pull msgs from ctb
print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start
@ -156,7 +156,7 @@ endi
if $data[0][1] != $consumerId then if $data[0][1] != $consumerId then
return -1 return -1
endi endi
if $data[0][2] != $totalMsgOfCtb then if $data[0][2] != $expectmsgcnt then
return -1 return -1
endi endi
if $data[0][3] != $totalMsgOfCtb then if $data[0][3] != $totalMsgOfCtb then
@ -194,8 +194,8 @@ $topicList = $topicList . '
$consumerId = 0 $consumerId = 0
$totalMsgOfNtb = $rowsPerCtb * $topicNum $totalMsgOfNtb = $rowsPerCtb * $topicNum
$expectmsgcnt = $totalMsgOfNtb $expectmsgcnt = $topicNum
sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfNtb , $ifcheckdata , $ifmanualcommit )
print == start consumer to pull msgs from ntb print == start consumer to pull msgs from ntb
print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start
@ -213,7 +213,7 @@ endi
if $data[0][1] != $consumerId then if $data[0][1] != $consumerId then
return -1 return -1
endi endi
if $data[0][2] != $totalMsgOfNtb then if $data[0][2] != $expectmsgcnt then
return -1 return -1
endi endi
if $data[0][3] != $totalMsgOfNtb then if $data[0][3] != $totalMsgOfNtb then

View File

@ -79,10 +79,10 @@ $topicList = $topicList . '
$consumerId = 0 $consumerId = 0
$totalMsgOfStb = $ctbNum * $rowsPerCtb $totalMsgOfStb = $ctbNum * $rowsPerCtb
$totalMsgOfStb = $totalMsgOfStb * $topicNum $totalMsgOfStb = $totalMsgOfStb * $topicNum
$expectmsgcnt = $totalMsgOfStb $expectmsgcnt = 9
sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfStb , $ifcheckdata , $ifmanualcommit )
$consumerId = 1 $consumerId = 1
sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $totalMsgOfStb , $ifcheckdata , $ifmanualcommit )
print == start consumer to pull msgs from stb print == start consumer to pull msgs from stb
print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -w $dbName -s start print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -w $dbName -s start
@ -131,19 +131,19 @@ endi
if $data[0][3] <= 0 then if $data[0][3] <= 0 then
return -1 return -1
endi endi
if $data[0][3] >= $expectmsgcnt then if $data[0][3] >= $totalMsgOfStb then
return -1 return -1
endi endi
if $data[1][3] <= 0 then if $data[1][3] <= 0 then
return -1 return -1
endi endi
if $data[1][3] >= $expectmsgcnt then if $data[1][3] >= $totalMsgOfStb then
return -1 return -1
endi endi
$sumOfConsRow = $data[0][3] + $data[1][3] $sumOfConsRow = $data[0][3] + $data[1][3]
if $sumOfConsRow != $expectmsgcnt then if $sumOfConsRow != $totalMsgOfStb then
return -1 return -1
endi endi
@ -178,10 +178,10 @@ $topicList = $topicList . '
$consumerId = 0 $consumerId = 0
$totalMsgOfCtb = $rowsPerCtb * $topicNum $totalMsgOfCtb = $rowsPerCtb * $topicNum
$expectmsgcnt = $totalMsgOfCtb $expectmsgcnt = $topicNum
sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfCtb , $ifcheckdata , $ifmanualcommit )
$consumerId = 1 $consumerId = 1
sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $totalMsgOfCtb , $ifcheckdata , $ifmanualcommit )
print == start consumer to pull msgs from ctb print == start consumer to pull msgs from ctb
print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start
@ -208,14 +208,14 @@ if $data[0][1] == 1 then
endi endi
endi endi
# either $data[0][2] == $totalMsgOfCtb and $data[1][2] == 0 # either $data[0][2] == $expectmsgcnt and $data[1][2] == 0
# or $data[0][2] == 0 and $data[1][2] == $totalMsgOfCtb # or $data[0][2] == 0 and $data[1][2] == $expectmsgcnt
if $data[0][2] == $totalMsgOfCtb then if $data[0][2] == $expectmsgcnt then
if $data[1][2] == 0 then if $data[1][2] == 0 then
goto check_ok_0 goto check_ok_0
endi endi
elif $data[0][2] == 0 then elif $data[0][2] == 0 then
if $data[1][2] == $totalMsgOfCtb then if $data[1][2] == $expectmsgcnt then
goto check_ok_0 goto check_ok_0
endi endi
endi endi
@ -266,10 +266,10 @@ $topicList = $topicList . '
$consumerId = 0 $consumerId = 0
$totalMsgOfNtb = $rowsPerCtb * $topicNum $totalMsgOfNtb = $rowsPerCtb * $topicNum
$expectmsgcnt = $totalMsgOfNtb $expectmsgcnt = $topicNum
sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) sql insert into consumeinfo values (now , $consumerId , $topicList , $keyList , $totalMsgOfNtb , $ifcheckdata , $ifmanualcommit )
$consumerId = 1 $consumerId = 1
sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $expectmsgcnt , $ifcheckdata , $ifmanualcommit ) sql insert into consumeinfo values (now+1s , $consumerId , $topicList , $keyList , $totalMsgOfNtb , $ifcheckdata , $ifmanualcommit )
print == start consumer to pull msgs from ntb print == start consumer to pull msgs from ntb
print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start print == tsim/tmq/consume.sh -d $dbName -y $pullDelay -g $showMsg -r $showRow -s start
@ -296,14 +296,14 @@ if $data[1][1] == 0 then
endi endi
endi endi
# either $data[0][2] == $totalMsgOfNtb and $data[1][2] == 0 # either $data[0][2] == $expectmsgcnt and $data[1][2] == 0
# or $data[0][2] == 0 and $data[1][2] == $totalMsgOfNtb # or $data[0][2] == 0 and $data[1][2] == $expectmsgcnt
if $data[0][2] == $totalMsgOfNtb then if $data[0][2] == $expectmsgcnt then
if $data[1][2] == 0 then if $data[1][2] == 0 then
goto check_ok_2 goto check_ok_2
endi endi
elif $data[0][2] == 0 then elif $data[0][2] == 0 then
if $data[1][2] == $totalMsgOfNtb then if $data[1][2] == $expectmsgcnt then
goto check_ok_2 goto check_ok_2
endi endi
endi endi