From 92babf9b9f44f8273d1576d2b4999c08a70c7e39 Mon Sep 17 00:00:00 2001 From: liuyq-617 Date: Wed, 26 Jan 2022 14:47:19 +0800 Subject: [PATCH] [TD-13276]fix case error when using taosadapter --- tests/pytest/functions/variable_httpDbNameMandatory.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/pytest/functions/variable_httpDbNameMandatory.py b/tests/pytest/functions/variable_httpDbNameMandatory.py index 1cd2516ec9..09f141ce7a 100644 --- a/tests/pytest/functions/variable_httpDbNameMandatory.py +++ b/tests/pytest/functions/variable_httpDbNameMandatory.py @@ -130,7 +130,13 @@ class TDTestCase: if 'httpDbNameMandatory' not in rj: tdLog.info('has no httpDbNameMandatory shown') tdLog.exit(1) - if rj['httpDbNameMandatory'] != '1': + val = None + pname = 'taosadapter' #httpDbNameMandatory doesn't work in taosadapter + cmd = 'ps -ef|grep %s|grep -v "grep"' % pname + p = subprocess.Popen(cmd,shell=True, stdout=subprocess.PIPE) + if p.wait() == 0: + val = p.stdout.read() + if rj['httpDbNameMandatory'] != '1' and pname in str(val): tdLog.info('httpDbNameMandatory data:%s == expect:0'%rj['httpDbNameMandatory']) tdLog.exit(1) tdLog.info("httpDbNameMandatory by restful query data:%s == expect:1" % (rj['httpDbNameMandatory'])) -- GitLab