Merge pull request #3520 from taosdata/xiaoping/add_test_case

fix test failures
This commit is contained in:
Shengliang Guan 2020-09-15 00:17:12 +08:00 committed by GitHub
commit ba826f2077
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 6 deletions

View File

@ -33,7 +33,7 @@ class TDTestCase:
tdDnodes.start(1) tdDnodes.start(1)
tdSql.execute('reset query cache') tdSql.execute('reset query cache')
tdSql.execute('drop database if exists db') tdSql.execute('drop database if exists db')
tdSql.execute('create database db cache 128 maxtables 10') tdSql.execute('create database db cache 128')
tdSql.execute('use db') tdSql.execute('use db')
tdLog.info("================= step1") tdLog.info("================= step1")

View File

@ -38,7 +38,7 @@ class TDTestCase:
tdLog.info("drop database db if exits") tdLog.info("drop database db if exits")
tdSql.execute('drop database if exists db') tdSql.execute('drop database if exists db')
tdLog.info("================= step1") tdLog.info("================= step1")
tdSql.execute('create database db maxtables 4') tdSql.execute('create database db')
tdLog.sleep(5) tdLog.sleep(5)
tdSql.execute('use db') tdSql.execute('use db')

View File

@ -38,7 +38,7 @@ class TDTestCase:
tdLog.info("drop database db if exits") tdLog.info("drop database db if exits")
tdSql.execute('drop database if exists db') tdSql.execute('drop database if exists db')
tdLog.info("================= step1") tdLog.info("================= step1")
tdSql.execute('create database db maxtables 4') tdSql.execute('create database db')
tdLog.sleep(5) tdLog.sleep(5)
tdSql.execute('use db') tdSql.execute('use db')

View File

@ -123,8 +123,12 @@ class TDSql:
def checkData(self, row, col, data): def checkData(self, row, col, data):
self.checkRowCol(row, col) self.checkRowCol(row, col)
if str(self.queryResult[row][col]) != str(data): if self.queryResult[row][col] != data:
if isinstance(data, float) and abs(self.queryResult[row][col] - data) <= 0.000001: if str(self.queryResult[row][col]) != str(data):
tdLog.info("sql:%s, row:%d col:%d data:%s == expect:%s" %
(self.sql, row, col, self.queryResult[row][col], data))
return
elif isinstance(data, float) and abs(self.queryResult[row][col] - data) <= 0.000001:
tdLog.info("sql:%s, row:%d col:%d data:%f == expect:%f" % tdLog.info("sql:%s, row:%d col:%d data:%f == expect:%f" %
(self.sql, row, col, self.queryResult[row][col], data)) (self.sql, row, col, self.queryResult[row][col], data))
return return

View File

@ -130,7 +130,6 @@ run general/parser/join.sim
run general/parser/join_multivnode.sim run general/parser/join_multivnode.sim
run general/parser/select_with_tags.sim run general/parser/select_with_tags.sim
run general/parser/groupby.sim run general/parser/groupby.sim
run general/parser/bug.sim
run general/parser/tags_dynamically_specifiy.sim run general/parser/tags_dynamically_specifiy.sim
run general/parser/set_tag_vals.sim run general/parser/set_tag_vals.sim
#unsupport run general/parser/repeatAlter.sim #unsupport run general/parser/repeatAlter.sim