test: modify check mode

This commit is contained in:
plum-lihui 2023-06-30 16:51:21 +08:00
parent 4bf970a3ce
commit 8dd2921cf1
2 changed files with 12 additions and 5 deletions

View File

@ -37,6 +37,9 @@ from util.common import *
# INSERT_DATA = 3
class TMQCom:
def __init__(self):
self.g_end_insert_flag = 0
def init(self, conn, logSql, replicaVar=1):
self.replicaVar = int(replicaVar)
tdSql.init(conn.cursor())
@ -332,6 +335,9 @@ class TMQCom:
#tdLog.debug("doing insert data into stable:%s rows:%d ..."%(stbName, allRows))
rowsOfCtb = 0
while rowsOfCtb < rowsPerTbl:
if (0 != self.g_end_insert_flag):
tdLog.debug("get signal to stop insert data")
break
for i in range(ctbNum):
sql += " %s.%s%d values "%(dbName,ctbPrefix,i+ctbStartIdx)
rowsBatched = 0

View File

@ -145,7 +145,7 @@ class TDTestCase:
'ctbPrefix': 'ctb',
'ctbStartIdx': 0,
'ctbNum': 10,
'rowsPerTbl': 1000,
'rowsPerTbl': 100000000,
'batchNum': 10,
'startTs': 1640966400000, # 2022-01-01 00:00:00.000
'pollDelay': 3,
@ -221,8 +221,9 @@ class TDTestCase:
if res != 'success':
tdLog.exit("limit max groupid fail")
tmqCom.g_end_insert_flag = 1
tdLog.debug("notify sub-thread to stop insert data")
pThread.join()
tdLog.info(" wait insert thread end")
tdLog.printNoPrefix("======== test case 1 end ...... ")