From a8a75f33d7ad5d382e033f69543458627b5d0d0e Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Sun, 27 Nov 2022 16:15:58 +0800 Subject: [PATCH 1/2] test: adjust tmqshow case --- tests/parallel_test/cases.task | 2 +- tests/system-test/7-tmq/tmqShow.py | 23 +++++++++++++++-------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/tests/parallel_test/cases.task b/tests/parallel_test/cases.task index cecaaef1d0..991e2fecd6 100644 --- a/tests/parallel_test/cases.task +++ b/tests/parallel_test/cases.task @@ -690,7 +690,7 @@ ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqCheckData.py ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqCheckData1.py ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsumerGroup.py -,,,system-test,python3 ./test.py -f 7-tmq/tmqShow.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqShow.py ,,,system-test,python3 ./test.py -f 7-tmq/tmqAlterSchema.py ,,,system-test,python3 ./test.py -f 7-tmq/tmqConsFromTsdb.py ,,,system-test,python3 ./test.py -f 7-tmq/tmqConsFromTsdb1.py diff --git a/tests/system-test/7-tmq/tmqShow.py b/tests/system-test/7-tmq/tmqShow.py index 8ec5e62ad9..31ddc1b0f8 100644 --- a/tests/system-test/7-tmq/tmqShow.py +++ b/tests/system-test/7-tmq/tmqShow.py @@ -126,14 +126,21 @@ class TDTestCase: pThread = tmqCom.asyncInsertData(paraDict) tmqCom.getStartConsumeNotifyFromTmqsim() - #time.sleep(5) - tdLog.info("check show consumers") - tdSql.query("show consumers") - # tdLog.info(tdSql.queryResult) - rows = tdSql.getRows() - tdLog.info("show consumers rows: %d"%rows) - if rows != len(topicNameList): - tdLog.exit("show consumers rows error") + + for i in range(0, 10, 1): + tdLog.info("check show consumers") + tdSql.query("show consumers") + # tdLog.info(tdSql.queryResult) + rows = tdSql.getRows() + tdLog.info("show consumers rows: %d" % rows) + + if rows == len(topicNameList): + tdLog.info("show consumers rows not match %d:%d" % + (rows, len(topicNameList))) + time.sleep(1) + break + if (rows == 9): + tdLog.exit("show consumers rows error") for i in range(0, 10, 1): tdLog.info("check show subscriptions") From 2dc23cdfe559d612872dc16d2848b29b5e313cbc Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Sun, 27 Nov 2022 17:49:23 +0800 Subject: [PATCH 2/2] test: adjust tmqCommon cases --- tests/parallel_test/cases.task | 16 ++++++++-------- tests/pytest/util/common.py | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/parallel_test/cases.task b/tests/parallel_test/cases.task index 991e2fecd6..6eb3fb29f2 100644 --- a/tests/parallel_test/cases.task +++ b/tests/parallel_test/cases.task @@ -692,14 +692,14 @@ ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsumerGroup.py ,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqShow.py ,,,system-test,python3 ./test.py -f 7-tmq/tmqAlterSchema.py -,,,system-test,python3 ./test.py -f 7-tmq/tmqConsFromTsdb.py -,,,system-test,python3 ./test.py -f 7-tmq/tmqConsFromTsdb1.py -,,,system-test,python3 ./test.py -f 7-tmq/tmqConsFromTsdb-mutilVg.py -,,,system-test,python3 ./test.py -f 7-tmq/tmqConsFromTsdb1-mutilVg.py -,,,system-test,python3 ./test.py -f 7-tmq/tmqConsFromTsdb-1ctb.py -,,,system-test,python3 ./test.py -f 7-tmq/tmqConsFromTsdb1-1ctb.py -,,,system-test,python3 ./test.py -f 7-tmq/tmqConsFromTsdb-1ctb-funcNFilter.py -,,,system-test,python3 ./test.py -f 7-tmq/tmqConsFromTsdb-mutilVg-mutilCtb-funcNFilter.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb1.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb-mutilVg.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb1-mutilVg.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb-1ctb.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb1-1ctb.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb-1ctb-funcNFilter.py +,,y,system-test,./pytest.sh python3 ./test.py -f 7-tmq/tmqConsFromTsdb-mutilVg-mutilCtb-funcNFilter.py ,,,system-test,python3 ./test.py -f 7-tmq/tmqConsFromTsdb-mutilVg-mutilCtb.py ,,,system-test,python3 ./test.py -f 7-tmq/tmqConsFromTsdb1-1ctb-funcNFilter.py ,,,system-test,python3 ./test.py -f 7-tmq/tmqConsFromTsdb1-mutilVg-mutilCtb-funcNFilter.py diff --git a/tests/pytest/util/common.py b/tests/pytest/util/common.py index 9ffebcbdad..5b73989d6f 100644 --- a/tests/pytest/util/common.py +++ b/tests/pytest/util/common.py @@ -737,7 +737,7 @@ class TDCom: if (platform.system().lower() == 'windows'): os.system("TASKKILL /F /IM %s.exe"%processorName) else: - os.system('pkill %s'%processorName) + os.system("unset LD_PRELOAD; pkill %s " % processorName) def is_json(msg):