Merge pull request #5042 from taosdata/test/testcase
<test>fix some error in python test frame
This commit is contained in:
commit
9a64b8a429
|
@ -56,6 +56,15 @@ class TDTestCase:
|
||||||
tdDnodes.startWithoutSleep(1)
|
tdDnodes.startWithoutSleep(1)
|
||||||
|
|
||||||
tdSql.taosdStatus(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):
|
def stop(self):
|
||||||
tdSql.close()
|
tdSql.close()
|
||||||
|
|
|
@ -194,11 +194,16 @@ 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':
|
try:
|
||||||
pstate = 1
|
if psutil.Process(pid).name() == 'taosd':
|
||||||
break
|
print('have already started')
|
||||||
if pstate:
|
pstate = 1
|
||||||
tdLog.sleep(5)
|
break
|
||||||
|
except psutil.NoSuchProcess:
|
||||||
|
pass
|
||||||
|
if pstate == state :break
|
||||||
|
if state or pstate:
|
||||||
|
tdLog.sleep(1)
|
||||||
continue
|
continue
|
||||||
pstate = 0
|
pstate = 0
|
||||||
break
|
break
|
||||||
|
@ -219,9 +224,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):
|
||||||
|
|
Loading…
Reference in New Issue