From ee18f991aa3b108bb23e19df4401a2f6406533e3 Mon Sep 17 00:00:00 2001 From: plum-lihui Date: Tue, 22 Nov 2022 16:54:42 +0800 Subject: [PATCH] test: add test case for tmq --- tests/parallel_test/cases.task | 1 + tests/system-test/7-tmq/tmqDnodeRestart1.py | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/parallel_test/cases.task b/tests/parallel_test/cases.task index e4c6a40be8..835ca61fd6 100644 --- a/tests/parallel_test/cases.task +++ b/tests/parallel_test/cases.task @@ -704,6 +704,7 @@ ,,,system-test,python3 ./test.py -f 7-tmq/tmqConsFromTsdb1-mutilVg-mutilCtb.py ,,,system-test,python3 ./test.py -f 7-tmq/tmqAutoCreateTbl.py ,,,system-test,python3 ./test.py -f 7-tmq/tmqDnodeRestart.py +,,,system-test,python3 ./test.py -f 7-tmq/tmqDnodeRestart1.py ,,,system-test,python3 ./test.py -f 7-tmq/tmqUpdate-1ctb.py ,,,system-test,python3 ./test.py -f 7-tmq/tmqUpdateWithConsume.py ,,,system-test,python3 ./test.py -f 7-tmq/tmqUpdate-multiCtb-snapshot0.py diff --git a/tests/system-test/7-tmq/tmqDnodeRestart1.py b/tests/system-test/7-tmq/tmqDnodeRestart1.py index 714f10b362..982cc0a631 100644 --- a/tests/system-test/7-tmq/tmqDnodeRestart1.py +++ b/tests/system-test/7-tmq/tmqDnodeRestart1.py @@ -149,6 +149,8 @@ class TDTestCase: tmqCom.waitSubscriptionExit(tdSql, topicFromStb) tdSql.query("drop topic %s"%topicFromStb) + + tmqCom.stopTmqSimProcess(processorName="tmq_sim") tdLog.printNoPrefix("======== test case 1 end ...... ") @@ -178,6 +180,8 @@ class TDTestCase: paraDict['vgroups'] = self.vgroups paraDict['ctbNum'] = self.ctbNum paraDict['rowsPerTbl'] = self.rowsPerTbl + + tmqCom.initConsumerTable() tdLog.info("create topics from stb") topicFromDb = 'topic_db' @@ -203,10 +207,10 @@ class TDTestCase: tmqCom.getStartCommitNotifyFromTmqsim('cdb',1) tdLog.info("create some new child table and insert data for latest mode") - paraDict["batchNum"] = 100 + paraDict["batchNum"] = 10 paraDict["ctbPrefix"] = 'newCtb' - paraDict["ctbNum"] = 10 - paraDict["rowsPerTbl"] = 10 + paraDict["ctbNum"] = 100 + paraDict["rowsPerTbl"] = 100 tmqCom.insert_data_with_autoCreateTbl(tdSql,paraDict["dbName"],paraDict["stbName"],paraDict["ctbPrefix"],paraDict["ctbNum"],paraDict["rowsPerTbl"],paraDict["batchNum"]) tdLog.info("================= restart dnode ===========================") -- GitLab