From 3a58f9f4a92a0ece691f88e5f94ef82ecb6b7e35 Mon Sep 17 00:00:00 2001 From: Ping Xiao Date: Mon, 14 Sep 2020 23:36:49 +0800 Subject: [PATCH] fix test failures --- tests/pytest/import_merge/importToCommit.py | 2 +- tests/pytest/tag_lite/datatype-without-alter.py | 2 +- tests/pytest/tag_lite/datatype.py | 2 +- tests/pytest/util/sql.py | 8 ++++++-- tests/script/fullGeneralSuite.sim | 1 - 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/tests/pytest/import_merge/importToCommit.py b/tests/pytest/import_merge/importToCommit.py index 9a17ae95fa..7bec5fcd5d 100644 --- a/tests/pytest/import_merge/importToCommit.py +++ b/tests/pytest/import_merge/importToCommit.py @@ -33,7 +33,7 @@ class TDTestCase: tdDnodes.start(1) tdSql.execute('reset query cache') 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') tdLog.info("================= step1") diff --git a/tests/pytest/tag_lite/datatype-without-alter.py b/tests/pytest/tag_lite/datatype-without-alter.py index 42bc42bdbf..da52e149a5 100644 --- a/tests/pytest/tag_lite/datatype-without-alter.py +++ b/tests/pytest/tag_lite/datatype-without-alter.py @@ -38,7 +38,7 @@ class TDTestCase: tdLog.info("drop database db if exits") tdSql.execute('drop database if exists db') tdLog.info("================= step1") - tdSql.execute('create database db maxtables 4') + tdSql.execute('create database db') tdLog.sleep(5) tdSql.execute('use db') diff --git a/tests/pytest/tag_lite/datatype.py b/tests/pytest/tag_lite/datatype.py index bc99cf74b0..f7fa9fa3a2 100644 --- a/tests/pytest/tag_lite/datatype.py +++ b/tests/pytest/tag_lite/datatype.py @@ -38,7 +38,7 @@ class TDTestCase: tdLog.info("drop database db if exits") tdSql.execute('drop database if exists db') tdLog.info("================= step1") - tdSql.execute('create database db maxtables 4') + tdSql.execute('create database db') tdLog.sleep(5) tdSql.execute('use db') diff --git a/tests/pytest/util/sql.py b/tests/pytest/util/sql.py index 627d712474..7de8efdfe9 100644 --- a/tests/pytest/util/sql.py +++ b/tests/pytest/util/sql.py @@ -123,8 +123,12 @@ class TDSql: def checkData(self, row, col, data): self.checkRowCol(row, col) - if str(self.queryResult[row][col]) != str(data): - if isinstance(data, float) and abs(self.queryResult[row][col] - data) <= 0.000001: + if self.queryResult[row][col] != data: + 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" % (self.sql, row, col, self.queryResult[row][col], data)) return diff --git a/tests/script/fullGeneralSuite.sim b/tests/script/fullGeneralSuite.sim index d137e53d27..4df7900265 100644 --- a/tests/script/fullGeneralSuite.sim +++ b/tests/script/fullGeneralSuite.sim @@ -130,7 +130,6 @@ run general/parser/join.sim run general/parser/join_multivnode.sim run general/parser/select_with_tags.sim run general/parser/groupby.sim -run general/parser/bug.sim run general/parser/tags_dynamically_specifiy.sim run general/parser/set_tag_vals.sim #unsupport run general/parser/repeatAlter.sim