未验证 提交 9a64b8a4 编写于 作者: H huili 提交者: GitHub

Merge pull request #5042 from taosdata/test/testcase

<test>fix some error in python test frame
......@@ -56,6 +56,15 @@ class TDTestCase:
tdDnodes.startWithoutSleep(1)
tdSql.taosdStatus(1)
tdSql.haveFile('/mnt/data00',1)
tdSql.haveFile('/mnt/data01',1)
tdSql.haveFile('/mnt/data02',1)
tdSql.haveFile('/mnt/data10',1)
tdSql.haveFile('/mnt/data11',1)
tdSql.haveFile('/mnt/data12',1)
tdSql.haveFile('/mnt/data20',1)
tdSql.haveFile('/mnt/data21',1)
tdSql.haveFile('/mnt/data22',1)
def stop(self):
tdSql.close()
......
......@@ -194,11 +194,16 @@ class TDSql:
pstate = 0
pl = psutil.pids()
for pid in pl:
if psutil.Process(pid).name == 'taosd':
pstate = 1
break
if pstate:
tdLog.sleep(5)
try:
if psutil.Process(pid).name() == 'taosd':
print('have already started')
pstate = 1
break
except psutil.NoSuchProcess:
pass
if pstate == state :break
if state or pstate:
tdLog.sleep(1)
continue
pstate = 0
break
......@@ -219,9 +224,9 @@ class TDSql:
tdLog.info("dir: %s is empty, expect: empty" %dir)
else:
if state :
tdLog.info("dir: %s is empty, expect: not empty" %dir)
tdLog.info("dir: %s is not empty, expect: not empty" %dir)
else:
tdLog.exit("dir: %s is empty, expect: empty" %dir)
tdLog.exit("dir: %s is not empty, expect: empty" %dir)
else:
tdLog.exit("dir: %s doesn't exist" %dir)
def createDir(self, dir):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册