提交 0abddd79 编写于 作者: L liuyq-617

[TD-13276]<test>fix case error when using taosadapter

上级 4b091bf5
......@@ -130,9 +130,16 @@ 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 not in str(val):
tdLog.info('httpDbNameMandatory data:%s == expect:0'%rj['httpDbNameMandatory'])
tdLog.exit(1)
if pname not in str(val):
tdLog.info("httpDbNameMandatory by restful query data:%s == expect:1" % (rj['httpDbNameMandatory']))
def run(self):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册