未验证 提交 f89d9834 编写于 作者: H Hui Li 提交者: GitHub

Merge pull request #7812 from taosdata/test/td-6358-d

[TD-6538]update version case
...@@ -15,6 +15,7 @@ import sys ...@@ -15,6 +15,7 @@ import sys
from util.log import * from util.log import *
from util.cases import * from util.cases import *
from util.sql import * from util.sql import *
from math import floor
class TDTestCase: class TDTestCase:
...@@ -37,13 +38,12 @@ class TDTestCase: ...@@ -37,13 +38,12 @@ class TDTestCase:
sql = "select client_version()" sql = "select client_version()"
ret = tdSql.query(sql) ret = tdSql.query(sql)
version = tdSql.getData(0, 0)[0:3] version = floor(float(tdSql.getData(0, 0)[0:3]))
expectedVersion_dev = "2.0" expectedVersion = 2
expectedVersion_master = "2.1" if(version == expectedVersion):
if(version == expectedVersion_dev or version == expectedVersion_master):
tdLog.info("sql:%s, row:%d col:%d data:%s == expect" % (sql, 0, 0, version)) tdLog.info("sql:%s, row:%d col:%d data:%s == expect" % (sql, 0, 0, version))
else: else:
tdLog.exit("sql:%s, row:%d col:%d data:%s != expect:%s or %s " % (sql, 0, 0, version, expectedVersion_dev, expectedVersion_master)) tdLog.exit("sql:%s, row:%d col:%d data:%d != expect:%d " % (sql, 0, 0, version, expectedVersion))
def stop(self): def stop(self):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册