diff --git a/tests/pytest/random-test/random-test-multi-threading-3.py b/tests/pytest/random-test/random-test-multi-threading-3.py index 4d1ef3b11d90cb8cbb72094b8f6a7d9ae091bc59..cd9e1b577a1087d5af29659ae4258e8ce9f1aa42 100644 --- a/tests/pytest/random-test/random-test-multi-threading-3.py +++ b/tests/pytest/random-test/random-test-multi-threading-3.py @@ -179,15 +179,16 @@ class Test (threading.Thread): tdDnodes.forcestop(1) tdDnodes.deploy(1) + tdDnodes.start(1) + tdSql.prepare() last_tb = "" last_stb = "" written = 0 - tdDnodes.start(1) - tdSql.prepare() def delete_datafiles(self): tdLog.info("delete_data_files") global last_tb + global last_stb global written dnodesDir = tdDnodes.getDnodesRootDir() @@ -195,10 +196,11 @@ class Test (threading.Thread): deleteCmd = 'rm -rf %s' % dataDir os.system(deleteCmd) - last_tb = "" - written = 0 tdDnodes.start(1) tdSql.prepare() + last_tb = "" + last_stb = "" + written = 0 def run(self): dataOp = { diff --git a/tests/pytest/random-test/random-test-multi-threading.py b/tests/pytest/random-test/random-test-multi-threading.py index 1c06f3a1ddd5bb527bd79fb8e15d003e576a466e..32546e0199acff8275c2ea3c2c73c45295e6df73 100644 --- a/tests/pytest/random-test/random-test-multi-threading.py +++ b/tests/pytest/random-test/random-test-multi-threading.py @@ -181,15 +181,16 @@ class Test (threading.Thread): tdDnodes.forcestop(1) tdDnodes.deploy(1) + tdDnodes.start(1) + tdSql.prepare() last_tb = "" last_stb = "" written = 0 - tdDnodes.start(1) - tdSql.prepare() def delete_datafiles(self): tdLog.info("delete_data_files") global last_tb + global last_stb global written dnodesDir = tdDnodes.getDnodesRootDir() @@ -197,11 +198,12 @@ class Test (threading.Thread): deleteCmd = 'rm -rf %s' % dataDir os.system(deleteCmd) - last_tb = "" - written = 0 tdDnodes.start(1) tdLog.sleep(10) tdSql.prepare() + last_tb = "" + last_stb = "" + written = 0 def run(self): dataOp = {