From a35c422793ad7b0e89396e4c7072c7dd143cb57f Mon Sep 17 00:00:00 2001 From: wu champion Date: Sat, 8 May 2021 12:29:54 +0800 Subject: [PATCH 1/2] [TD-3921] fix the case for new python connector --- tests/pytest/stream/showStreamExecTimeisNull.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/pytest/stream/showStreamExecTimeisNull.py b/tests/pytest/stream/showStreamExecTimeisNull.py index 39b0259018..0ffbdb2042 100644 --- a/tests/pytest/stream/showStreamExecTimeisNull.py +++ b/tests/pytest/stream/showStreamExecTimeisNull.py @@ -67,7 +67,9 @@ class TDTestCase: self.queryRows = len(self.queryResult) self.queryCols = len(tdSql.cursor.description) # tdLog.info("sql: %s, try to retrieve %d rows,get %d rows" % (sql, expectRows, self.queryRows)) - if self.queryRows >= timeout: + if self.queryRows >= 1: + tdSql.query(sql) + tdSql.checkData(0, 5, None) return (self.queryRows, i) time.sleep(1) except Exception as e: @@ -75,6 +77,8 @@ class TDTestCase: else: tdLog.exit(f"sql: {sql} except raise {exception}, actually not") + tdSql.checkData(0, 5, None) + def run(self): tdSql.execute("drop database if exists dbcq") From b551731da15355775b34997047e31783548e641b Mon Sep 17 00:00:00 2001 From: wu champion Date: Sat, 8 May 2021 12:39:32 +0800 Subject: [PATCH 2/2] fix the case --- tests/pytest/stream/showStreamExecTimeisNull.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/pytest/stream/showStreamExecTimeisNull.py b/tests/pytest/stream/showStreamExecTimeisNull.py index 0ffbdb2042..8a2a09cec6 100644 --- a/tests/pytest/stream/showStreamExecTimeisNull.py +++ b/tests/pytest/stream/showStreamExecTimeisNull.py @@ -73,12 +73,9 @@ class TDTestCase: return (self.queryRows, i) time.sleep(1) except Exception as e: - tdLog.info(f"sql: {sql} except raise {exception}, actually raise {repr(e)} ") - else: - tdLog.exit(f"sql: {sql} except raise {exception}, actually not") - - tdSql.checkData(0, 5, None) - + tdLog.exit(f"sql: {sql} except raise {exception}, actually raise {repr(e)} ") + # else: + # tdLog.exit(f"sql: {sql} except raise {exception}, actually not") def run(self): tdSql.execute("drop database if exists dbcq")