From 7b72757e015c5050df28572f7d0017cc1cc582c9 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Wed, 13 Jul 2022 14:59:23 +0800 Subject: [PATCH] test: fix tools/taosdumpTest3.py (#14848) --- tests/pytest/tools/taosdumpTest.py | 7 +++++++ tests/pytest/tools/taosdumpTest3.py | 3 +++ 2 files changed, 10 insertions(+) diff --git a/tests/pytest/tools/taosdumpTest.py b/tests/pytest/tools/taosdumpTest.py index 2155556776..95ed69b917 100644 --- a/tests/pytest/tools/taosdumpTest.py +++ b/tests/pytest/tools/taosdumpTest.py @@ -60,6 +60,13 @@ class TDTestCase: else: print("directory exists") + for i in range(1, 9): + if not os.path.exists("./taosdumptest/tmp%d" % i): + os.makedirs("./taosdumptest/tmp%d" % i) + else: + os.system("rm -rf ./taosdumptest/tmp%d" % i) + os.makedirs("./taosdumptest/tmp%d" % i) + if not os.path.exists("./taosdumptest/tmp2"): os.makedirs("./taosdumptest/tmp2") tdSql.execute("drop database if exists db") diff --git a/tests/pytest/tools/taosdumpTest3.py b/tests/pytest/tools/taosdumpTest3.py index 3994ad0323..e8fb46f3a8 100644 --- a/tests/pytest/tools/taosdumpTest3.py +++ b/tests/pytest/tools/taosdumpTest3.py @@ -57,6 +57,9 @@ class TDTestCase: def run(self): if not os.path.exists("./taosdumptest"): os.makedirs("./taosdumptest") + else: + print("directory exists") + for i in range(1, 9): if not os.path.exists("./taosdumptest/tmp%d" % i): os.makedirs("./taosdumptest/tmp%d" % i) -- GitLab