diff --git a/tests/pytest/util/sql.py b/tests/pytest/util/sql.py index 4f7607fc6c000d7ca55035e6973bfb5577a67964..e20515140ecc5cb490373fdd806e7b06df1d17f1 100644 --- a/tests/pytest/util/sql.py +++ b/tests/pytest/util/sql.py @@ -194,9 +194,13 @@ class TDSql: pstate = 0 pl = psutil.pids() for pid in pl: - if psutil.Process(pid).name == 'taosd': - pstate = 1 - break + try: + if psutil.Process(pid).name() == 'taosd': + print('have already started') + pstate = 1 + break + except psutil.NoSuchProcess: + pass if pstate: tdLog.sleep(5) continue