From ad78407ea78d009f6e7b7a3c3cf22ffc4abd9703 Mon Sep 17 00:00:00 2001 From: wenzhouwww Date: Thu, 17 Nov 2022 11:14:14 +0800 Subject: [PATCH] test: modify test case --- tests/system-test/7-tmq/tmqShow.py | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/tests/system-test/7-tmq/tmqShow.py b/tests/system-test/7-tmq/tmqShow.py index 5e79f17459..8ec5e62ad9 100644 --- a/tests/system-test/7-tmq/tmqShow.py +++ b/tests/system-test/7-tmq/tmqShow.py @@ -135,12 +135,21 @@ class TDTestCase: if rows != len(topicNameList): tdLog.exit("show consumers rows error") - tdLog.info("check show subscriptions") - tdSql.query("show subscriptions") - tdLog.debug(tdSql.queryResult) - rows = tdSql.getRows() - expectSubscriptions = paraDict['vgroups'] * len(topicNameList) - tdLog.info("show subscriptions rows: %d, expect Subscriptions: %d"%(rows,expectSubscriptions)) + for i in range(0, 10, 1): + tdLog.info("check show subscriptions") + tdSql.query("show subscriptions") + tdLog.debug(tdSql.queryResult) + rows = tdSql.getRows() + expectSubscriptions = paraDict['vgroups'] * len(topicNameList) + tdLog.info("show subscriptions rows: %d, expect Subscriptions: %d"%(rows,expectSubscriptions)) + if rows != expectSubscriptions: + # tdLog.exit("show subscriptions rows error") + tdLog.info("continue retry[%d] to show subscriptions"%(i)) + time.sleep(1) + continue + else: + break + if rows != expectSubscriptions: tdLog.exit("show subscriptions rows error") -- GitLab