<test>fix some error in python test frame

This commit is contained in:
liuyq-617 2021-01-26 16:06:16 +08:00
parent c906dd5c1e
commit a9da437d02
1 changed files with 6 additions and 5 deletions

View File

@ -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:
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):