test: modify delete data case
This commit is contained in:
parent
dbc119f1b1
commit
ef055e33fb
|
@ -336,14 +336,14 @@ class TDTestCase:
|
||||||
auto.offset.reset:earliest'
|
auto.offset.reset:earliest'
|
||||||
tmqCom.insertConsumerInfo(consumerId, expectrowcnt,topicList,keyList,ifcheckdata,ifManualCommit)
|
tmqCom.insertConsumerInfo(consumerId, expectrowcnt,topicList,keyList,ifcheckdata,ifManualCommit)
|
||||||
|
|
||||||
tdLog.info("start consume processor")
|
|
||||||
tmqCom.startTmqSimProcess(pollDelay=paraDict['pollDelay'],dbName=paraDict["dbName"],showMsg=paraDict['showMsg'], showRow=paraDict['showRow'],snapshot=paraDict['snapshot'])
|
|
||||||
|
|
||||||
# del some data
|
# del some data
|
||||||
rowsOfDelete = int(self.rowsPerTbl / 4 )
|
rowsOfDelete = int(self.rowsPerTbl / 4 )
|
||||||
paraDict["endTs"] = paraDict["startTs"] + rowsOfDelete - 1
|
paraDict["endTs"] = paraDict["startTs"] + rowsOfDelete - 1
|
||||||
pDeleteThread = self.asyncDeleteData(paraDict)
|
pDeleteThread = self.asyncDeleteData(paraDict)
|
||||||
|
|
||||||
|
tdLog.info("start consume processor")
|
||||||
|
tmqCom.startTmqSimProcess(pollDelay=paraDict['pollDelay'],dbName=paraDict["dbName"],showMsg=paraDict['showMsg'], showRow=paraDict['showRow'],snapshot=paraDict['snapshot'])
|
||||||
|
|
||||||
# update to 1/4 rows and insert 3/4 new rows
|
# update to 1/4 rows and insert 3/4 new rows
|
||||||
paraDict['startTs'] = paraDict['startTs'] + int(self.rowsPerTbl * 3 / 4)
|
paraDict['startTs'] = paraDict['startTs'] + int(self.rowsPerTbl * 3 / 4)
|
||||||
# paraDict['rowsPerTbl'] = self.rowsPerTbl
|
# paraDict['rowsPerTbl'] = self.rowsPerTbl
|
||||||
|
@ -366,12 +366,11 @@ class TDTestCase:
|
||||||
|
|
||||||
tdLog.info("act consume rows: %d, act query rows: %d, expect consume rows: %d, "%(totalConsumeRows, totalRowsFromQuery, expectrowcnt))
|
tdLog.info("act consume rows: %d, act query rows: %d, expect consume rows: %d, "%(totalConsumeRows, totalRowsFromQuery, expectrowcnt))
|
||||||
|
|
||||||
|
|
||||||
if self.snapshot == 0:
|
if self.snapshot == 0:
|
||||||
if totalConsumeRows != expectrowcnt:
|
if totalConsumeRows != expectrowcnt:
|
||||||
tdLog.exit("tmq consume rows error with snapshot = 0!")
|
tdLog.exit("tmq consume rows error with snapshot = 0!")
|
||||||
elif self.snapshot == 1:
|
elif self.snapshot == 1:
|
||||||
if totalConsumeRows != totalRowsFromQuery:
|
if not ((totalConsumeRows >= totalRowsFromQuery) and (totalConsumeRows <= expectrowcnt)):
|
||||||
tdLog.exit("tmq consume rows error with snapshot = 1!")
|
tdLog.exit("tmq consume rows error with snapshot = 1!")
|
||||||
|
|
||||||
# tmqCom.checkFileContent(consumerId, queryString)
|
# tmqCom.checkFileContent(consumerId, queryString)
|
||||||
|
|
|
@ -336,14 +336,14 @@ class TDTestCase:
|
||||||
auto.offset.reset:earliest'
|
auto.offset.reset:earliest'
|
||||||
tmqCom.insertConsumerInfo(consumerId, expectrowcnt,topicList,keyList,ifcheckdata,ifManualCommit)
|
tmqCom.insertConsumerInfo(consumerId, expectrowcnt,topicList,keyList,ifcheckdata,ifManualCommit)
|
||||||
|
|
||||||
tdLog.info("start consume processor")
|
|
||||||
tmqCom.startTmqSimProcess(pollDelay=paraDict['pollDelay'],dbName=paraDict["dbName"],showMsg=paraDict['showMsg'], showRow=paraDict['showRow'],snapshot=paraDict['snapshot'])
|
|
||||||
|
|
||||||
# del some data
|
# del some data
|
||||||
rowsOfDelete = int(self.rowsPerTbl / 4 )
|
rowsOfDelete = int(self.rowsPerTbl / 4 )
|
||||||
paraDict["endTs"] = paraDict["startTs"] + rowsOfDelete - 1
|
paraDict["endTs"] = paraDict["startTs"] + rowsOfDelete - 1
|
||||||
pDeleteThread = self.asyncDeleteData(paraDict)
|
pDeleteThread = self.asyncDeleteData(paraDict)
|
||||||
|
|
||||||
|
tdLog.info("start consume processor")
|
||||||
|
tmqCom.startTmqSimProcess(pollDelay=paraDict['pollDelay'],dbName=paraDict["dbName"],showMsg=paraDict['showMsg'], showRow=paraDict['showRow'],snapshot=paraDict['snapshot'])
|
||||||
|
|
||||||
# update to 1/4 rows and insert 3/4 new rows
|
# update to 1/4 rows and insert 3/4 new rows
|
||||||
paraDict['startTs'] = paraDict['startTs'] + int(self.rowsPerTbl * 3 / 4)
|
paraDict['startTs'] = paraDict['startTs'] + int(self.rowsPerTbl * 3 / 4)
|
||||||
# paraDict['rowsPerTbl'] = self.rowsPerTbl
|
# paraDict['rowsPerTbl'] = self.rowsPerTbl
|
||||||
|
|
Loading…
Reference in New Issue