From b82befef7154e1b677acb87a4f4b9dc497c4984a Mon Sep 17 00:00:00 2001 From: cpwu Date: Mon, 9 May 2022 00:27:52 +0800 Subject: [PATCH] fix case --- tests/system-test/2-query/ltrim.py | 10 +++++----- tests/system-test/2-query/rtrim.py | 10 +++++----- tests/system-test/2-query/substr.py | 14 +++++++------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/tests/system-test/2-query/ltrim.py b/tests/system-test/2-query/ltrim.py index ef3fd3de21..15f40a09c3 100644 --- a/tests/system-test/2-query/ltrim.py +++ b/tests/system-test/2-query/ltrim.py @@ -251,13 +251,13 @@ class TDTestCase: tdLog.printNoPrefix("==========step3:all check") self.all_test() - # tdDnodes.stop(1) - # tdDnodes.start(1) + tdDnodes.stop(1) + tdDnodes.start(1) - # tdSql.execute("use db") + tdSql.execute("use db") - # tdLog.printNoPrefix("==========step4:after wal, all check again ") - # self.all_test() + tdLog.printNoPrefix("==========step4:after wal, all check again ") + self.all_test() def stop(self): tdSql.close() diff --git a/tests/system-test/2-query/rtrim.py b/tests/system-test/2-query/rtrim.py index f99145b7b1..30624792cc 100644 --- a/tests/system-test/2-query/rtrim.py +++ b/tests/system-test/2-query/rtrim.py @@ -251,13 +251,13 @@ class TDTestCase: tdLog.printNoPrefix("==========step3:all check") self.all_test() - # tdDnodes.stop(1) - # tdDnodes.start(1) + tdDnodes.stop(1) + tdDnodes.start(1) - # tdSql.execute("use db") + tdSql.execute("use db") - # tdLog.printNoPrefix("==========step4:after wal, all check again ") - # self.all_test() + tdLog.printNoPrefix("==========step4:after wal, all check again ") + self.all_test() def stop(self): tdSql.close() diff --git a/tests/system-test/2-query/substr.py b/tests/system-test/2-query/substr.py index 1b3b5895f4..e78606826b 100644 --- a/tests/system-test/2-query/substr.py +++ b/tests/system-test/2-query/substr.py @@ -66,7 +66,7 @@ class TDTestCase: def __group_condition(self, col, having = ""): return f" group by {col} having {having}" if having else f" group by {col} " - def __substr_check(self, tbname,pos, lens=2): + def __substr_check(self, tbname,pos, lens=None): substr_condition = self.__substr_condition() for condition in substr_condition: where_condition = self.__where_condition(condition) @@ -96,7 +96,7 @@ class TDTestCase: ) ) - sqls.extend( f"select substr( {char_col} , {num_col} ) from {tbname} " for char_col in CHAR_COL ) + sqls.extend( f"select substr( {char_col} + {num_col} ) from {tbname} " for char_col in CHAR_COL ) sqls.extend( f"select substr( {num_col} , {ts_col} ) from {tbname} " for ts_col in TS_TYPE_COL ) sqls.extend( f"select substr( {num_col} , {bool_col} ) from {tbname} " for bool_col in BOOLEAN_COL ) @@ -255,13 +255,13 @@ class TDTestCase: tdLog.printNoPrefix("==========step3:all check") self.all_test() - # tdDnodes.stop(1) - # tdDnodes.start(1) + tdDnodes.stop(1) + tdDnodes.start(1) - # tdSql.execute("use db") + tdSql.execute("use db") - # tdLog.printNoPrefix("==========step4:after wal, all check again ") - # self.all_test() + tdLog.printNoPrefix("==========step4:after wal, all check again ") + self.all_test() def stop(self): tdSql.close()