提交 34a14a87 编写于 作者: S Shuduo Sang

fix multi-thread cases.

上级 ab471332
...@@ -179,15 +179,16 @@ class Test (threading.Thread): ...@@ -179,15 +179,16 @@ class Test (threading.Thread):
tdDnodes.forcestop(1) tdDnodes.forcestop(1)
tdDnodes.deploy(1) tdDnodes.deploy(1)
tdDnodes.start(1)
tdSql.prepare()
last_tb = "" last_tb = ""
last_stb = "" last_stb = ""
written = 0 written = 0
tdDnodes.start(1)
tdSql.prepare()
def delete_datafiles(self): def delete_datafiles(self):
tdLog.info("delete_data_files") tdLog.info("delete_data_files")
global last_tb global last_tb
global last_stb
global written global written
dnodesDir = tdDnodes.getDnodesRootDir() dnodesDir = tdDnodes.getDnodesRootDir()
...@@ -195,10 +196,11 @@ class Test (threading.Thread): ...@@ -195,10 +196,11 @@ class Test (threading.Thread):
deleteCmd = 'rm -rf %s' % dataDir deleteCmd = 'rm -rf %s' % dataDir
os.system(deleteCmd) os.system(deleteCmd)
last_tb = ""
written = 0
tdDnodes.start(1) tdDnodes.start(1)
tdSql.prepare() tdSql.prepare()
last_tb = ""
last_stb = ""
written = 0
def run(self): def run(self):
dataOp = { dataOp = {
......
...@@ -181,15 +181,16 @@ class Test (threading.Thread): ...@@ -181,15 +181,16 @@ class Test (threading.Thread):
tdDnodes.forcestop(1) tdDnodes.forcestop(1)
tdDnodes.deploy(1) tdDnodes.deploy(1)
tdDnodes.start(1)
tdSql.prepare()
last_tb = "" last_tb = ""
last_stb = "" last_stb = ""
written = 0 written = 0
tdDnodes.start(1)
tdSql.prepare()
def delete_datafiles(self): def delete_datafiles(self):
tdLog.info("delete_data_files") tdLog.info("delete_data_files")
global last_tb global last_tb
global last_stb
global written global written
dnodesDir = tdDnodes.getDnodesRootDir() dnodesDir = tdDnodes.getDnodesRootDir()
...@@ -197,11 +198,12 @@ class Test (threading.Thread): ...@@ -197,11 +198,12 @@ class Test (threading.Thread):
deleteCmd = 'rm -rf %s' % dataDir deleteCmd = 'rm -rf %s' % dataDir
os.system(deleteCmd) os.system(deleteCmd)
last_tb = ""
written = 0
tdDnodes.start(1) tdDnodes.start(1)
tdLog.sleep(10) tdLog.sleep(10)
tdSql.prepare() tdSql.prepare()
last_tb = ""
last_stb = ""
written = 0
def run(self): def run(self):
dataOp = { dataOp = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册