From 07ed17806540e8bc1c51006419f3f708e3cb581e Mon Sep 17 00:00:00 2001 From: tangfangzhi Date: Fri, 11 Nov 2022 11:54:52 +0800 Subject: [PATCH] test: add case for tmq in replica3 --- tests/parallel_test/cases.task | 1 + tests/system-test/7-tmq/tmqSubscribeStb-r3.py | 30 ++++++++++--------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/tests/parallel_test/cases.task b/tests/parallel_test/cases.task index 6775760ee4..8955a65dfa 100644 --- a/tests/parallel_test/cases.task +++ b/tests/parallel_test/cases.task @@ -714,6 +714,7 @@ ,,,system-test,python3 ./test.py -f 7-tmq/tmq_taosx.py ,,,system-test,python3 ./test.py -f 7-tmq/stbTagFilter-multiCtb.py ,,,system-test,python3 ./test.py -f 99-TDcase/TD-19201.py +,,,system-test,python3 ./test.py -f 7-tmq/tmqSubscribeStb-r3.py -N 5 ,,,system-test,python3 ./test.py -f 2-query/between.py -Q 2 ,,,system-test,python3 ./test.py -f 2-query/distinct.py -Q 2 ,,,system-test,python3 ./test.py -f 2-query/varchar.py -Q 2 diff --git a/tests/system-test/7-tmq/tmqSubscribeStb-r3.py b/tests/system-test/7-tmq/tmqSubscribeStb-r3.py index 01f1ca5b15..85222a941b 100644 --- a/tests/system-test/7-tmq/tmqSubscribeStb-r3.py +++ b/tests/system-test/7-tmq/tmqSubscribeStb-r3.py @@ -1,26 +1,27 @@ -from distutils.log import error -import taos -import sys -import time -import socket import os -import threading -import subprocess import platform +import socket +import subprocess +import sys +import threading +import time +from distutils.log import error -from util.log import * -from util.sql import * +import taos from util.cases import * -from util.dnodes import * -from util.dnodes import TDDnodes -from util.dnodes import TDDnode from util.cluster import * from util.common import * +from util.dnodes import * +from util.dnodes import TDDnode, TDDnodes +from util.log import * +from util.sql import * + sys.path.append("./6-cluster") sys.path.append("./7-tmq") -from tmqCommon import * -from clusterCommonCreate import * from clusterCommonCheck import clusterComCheck +from clusterCommonCreate import * +from tmqCommon import * + class TDTestCase: def __init__(self): @@ -265,6 +266,7 @@ class TDTestCase: tdLog.info("start consume processor") tmqCom.startTmqSimProcess(pollDelay=paraDict['pollDelay'],dbName=paraDict["dbName"],showMsg=paraDict['showMsg'], showRow=paraDict['showRow'],snapshot=paraDict['snapshot']) + tmqCom.getStartConsumeNotifyFromTmqsim() tdLog.info("================= restart dnode 2===========================") cluster.dnodes[1].stoptaosd() cluster.dnodes[1].starttaosd()