diff --git a/tests/pytest/multilevel/threeLevelMountPoint.py b/tests/pytest/multilevel/threeLevelMountPoint.py index ccaf95f47d389e053c042a4a20cefad2c7d08776..d97602eb76889ab265f6bc673f5c7558be5d7fe3 100644 --- a/tests/pytest/multilevel/threeLevelMountPoint.py +++ b/tests/pytest/multilevel/threeLevelMountPoint.py @@ -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() diff --git a/tests/pytest/util/sql.py b/tests/pytest/util/sql.py index 4f7607fc6c000d7ca55035e6973bfb5577a67964..16931cca333a3300b7d0d6831bbb51db0238b1d1 100644 --- a/tests/pytest/util/sql.py +++ b/tests/pytest/util/sql.py @@ -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):