提交 a9da437d 编写于 作者: L liuyq-617

<test>fix some error in python test frame

上级 c906dd5c
...@@ -194,11 +194,12 @@ class TDSql: ...@@ -194,11 +194,12 @@ class TDSql:
pstate = 0 pstate = 0
pl = psutil.pids() pl = psutil.pids()
for pid in pl: for pid in pl:
if psutil.Process(pid).name == 'taosd': if psutil.Process(pid).name() == 'taosd':
pstate = 1 pstate = 1
break break
if pstate: if pstate == state :break
tdLog.sleep(5) if state or pstate:
tdLog.sleep(1)
continue continue
pstate = 0 pstate = 0
break break
...@@ -219,9 +220,9 @@ class TDSql: ...@@ -219,9 +220,9 @@ class TDSql:
tdLog.info("dir: %s is empty, expect: empty" %dir) tdLog.info("dir: %s is empty, expect: empty" %dir)
else: else:
if state : if state :
tdLog.info("dir: %s is empty, expect: not empty" %dir) tdLog.info("dir: %s is not empty, expect: not empty" %dir)
else: else:
tdLog.exit("dir: %s is empty, expect: empty" %dir) tdLog.exit("dir: %s is not empty, expect: empty" %dir)
else: else:
tdLog.exit("dir: %s doesn't exist" %dir) tdLog.exit("dir: %s doesn't exist" %dir)
def createDir(self, dir): def createDir(self, dir):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册