提交 53683446 编写于 作者: S Shuduo Sang

fix random-test delete datafiles bug.

上级 49eeb2ab
......@@ -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()
......
......@@ -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 = ""
......
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册