test: modify check mode
This commit is contained in:
parent
4bf970a3ce
commit
8dd2921cf1
|
@ -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())
|
||||
|
@ -330,8 +333,11 @@ class TMQCom:
|
|||
ctbDict[i] = 0
|
||||
|
||||
#tdLog.debug("doing insert data into stable:%s rows:%d ..."%(stbName, allRows))
|
||||
rowsOfCtb = 0
|
||||
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
|
||||
|
|
|
@ -13,7 +13,7 @@ from tmqCommon import *
|
|||
|
||||
class TDTestCase:
|
||||
updatecfgDict = {'debugFlag': 135}
|
||||
|
||||
|
||||
def __init__(self):
|
||||
self.vgroups = 1
|
||||
self.ctbNum = 10
|
||||
|
@ -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,9 +221,10 @@ 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 ...... ")
|
||||
|
||||
def run(self):
|
||||
|
|
Loading…
Reference in New Issue