From 83363f6e7813cd4c6e33972808ee1f0ce815a680 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Thu, 9 Jul 2020 17:45:48 +0800 Subject: [PATCH] re-raise exception in sql.py instead of exit. --- tests/pytest/util/sql.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/pytest/util/sql.py b/tests/pytest/util/sql.py index 96ea036adc..ec39ab61b9 100644 --- a/tests/pytest/util/sql.py +++ b/tests/pytest/util/sql.py @@ -71,7 +71,8 @@ class TDSql: except Exception as e: caller = inspect.getframeinfo(inspect.stack()[1][0]) args = (caller.filename, caller.lineno, sql, repr(e)) - tdLog.exit("%s(%d) failed: sql:%s, %s" % args) + tdLog.notice("%s(%d) failed: sql:%s, %s" % args) + raise Exception(repr(e)) return self.queryRows def waitedQuery(self, sql, expectRows, timeout): @@ -89,7 +90,8 @@ class TDSql: except Exception as e: caller = inspect.getframeinfo(inspect.stack()[1][0]) args = (caller.filename, caller.lineno, sql, repr(e)) - tdLog.exit("%s(%d) failed: sql:%s, %s" % args) + tdLog.notice("%s(%d) failed: sql:%s, %s" % args) + raise Exception(repr(e)) return (self.queryRows, timeout) def checkRows(self, expectRows): @@ -158,7 +160,8 @@ class TDSql: except Exception as e: caller = inspect.getframeinfo(inspect.stack()[1][0]) args = (caller.filename, caller.lineno, sql, repr(e)) - tdLog.exit("%s(%d) failed: sql:%s, %s" % args) + tdLog.notice("%s(%d) failed: sql:%s, %s" % args) + raise Exception(repr(e)) return self.affectedRows def checkAffectedRows(self, expectAffectedRows): -- GitLab