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 cab17c4c1a91a25db57a88d674b7b60accd55a34..91f35ea7a5b812c28711a75b91ce8faa71223d68 100644 --- a/tests/pytest/random-test/random-test-multi-threading-3.py +++ b/tests/pytest/random-test/random-test-multi-threading-3.py @@ -205,6 +205,7 @@ class Test (Thread): global written dnodesDir = tdDnodes.getDnodesRootDir() + tdDnodes.forcestop(1) dataDir = dnodesDir + '/dnode1/data/*' deleteCmd = 'rm -rf %s' % dataDir os.system(deleteCmd) @@ -261,7 +262,7 @@ class Test (Thread): while True: self.queryEvent.wait() tdLog.notice("third thread") - randQueryOp = random.randint(1, 9) + randQueryOp = random.randint(1, 2) queryOp.get(randQueryOp, lambda: "ERROR")() self.queryEvent.clear() self.dbEvent.clear() diff --git a/tests/pytest/random-test/random-test-multi-threading.py b/tests/pytest/random-test/random-test-multi-threading.py index 1d8a5c3c82f98ffeb5817186b78959a2e160b302..997001157e804021d465ad4a6c580ad33e5631c5 100644 --- a/tests/pytest/random-test/random-test-multi-threading.py +++ b/tests/pytest/random-test/random-test-multi-threading.py @@ -208,12 +208,12 @@ class Test (threading.Thread): global written dnodesDir = tdDnodes.getDnodesRootDir() + tdDnodes.forcestop(1) dataDir = dnodesDir + '/dnode1/data/*' deleteCmd = 'rm -rf %s' % dataDir os.system(deleteCmd) tdDnodes.start(1) -# tdLog.sleep(10) tdSql.prepare() last_tb = "" last_stb = "" diff --git a/tests/pytest/random-test/random-test.py b/tests/pytest/random-test/random-test.py index 855cabdeddf5c437a658f145ce2fa66415b001a3..9cfc24f4045b6f57448dce7893d30fe68944afc6 100644 --- a/tests/pytest/random-test/random-test.py +++ b/tests/pytest/random-test/random-test.py @@ -166,7 +166,8 @@ class Test: def delete_datafiles(self): tdLog.info("delete_datafiles") dnodesDir = tdDnodes.getDnodesRootDir() - dataDir = dnodesDir + '/dnode1/*' + tdDnodes.forcestop(1) + dataDir = dnodesDir + '/dnode1/data/*' deleteCmd = 'rm -rf %s' % dataDir os.system(deleteCmd)