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

add function to delete data files.

上级 c736e05c
......@@ -108,6 +108,18 @@ class Test:
tdDnodes.start(1)
tdSql.prepare()
def delete_datafiles(self):
tdLog.info("delete data files")
dnodesDir = tdDnodes.getDnodesRootDir()
dataDir = dnodesDir + '/dnode1/*'
deleteCmd = 'rm -rf %s' % dataDir
os.system(deleteCmd)
self.current_tb = ""
self.last_tb = ""
self.written = 0
tdDnodes.start(1)
tdSql.prepare()
class TDTestCase:
def init(self, conn, logSql):
......@@ -129,10 +141,11 @@ class TDTestCase:
7: test.drop_table,
8: test.reset_query_cache,
9: test.reset_database,
10: test.delete_datafiles,
}
for x in range(1, 100):
r = random.randint(1, 9)
r = random.randint(1, 10)
tdLog.notice("iteration %d run func %d" % (x, r))
switch.get(r, lambda: "ERROR")()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册