fix: test error
This commit is contained in:
parent
f6bd86272b
commit
78b5396f86
|
@ -155,6 +155,9 @@ class TDSql:
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.cursor.execute(sql)
|
self.cursor.execute(sql)
|
||||||
|
self.queryResult = self.cursor.fetchall()
|
||||||
|
self.queryRows = len(self.queryResult)
|
||||||
|
self.queryCols = len(self.cursor.description)
|
||||||
except BaseException as e:
|
except BaseException as e:
|
||||||
tdLog.info("err:%s" % (e))
|
tdLog.info("err:%s" % (e))
|
||||||
expectErrNotOccured = False
|
expectErrNotOccured = False
|
||||||
|
@ -165,10 +168,6 @@ class TDSql:
|
||||||
if expectErrNotOccured:
|
if expectErrNotOccured:
|
||||||
tdLog.exit("%s(%d) failed: sql:%s, expect error not occured" % (caller.filename, caller.lineno, sql))
|
tdLog.exit("%s(%d) failed: sql:%s, expect error not occured" % (caller.filename, caller.lineno, sql))
|
||||||
else:
|
else:
|
||||||
self.queryRows = 0
|
|
||||||
self.queryCols = 0
|
|
||||||
self.queryResult = None
|
|
||||||
|
|
||||||
if fullMatched:
|
if fullMatched:
|
||||||
if expectedErrno != None:
|
if expectedErrno != None:
|
||||||
expectedErrno_rest = expectedErrno & 0x0000ffff
|
expectedErrno_rest = expectedErrno & 0x0000ffff
|
||||||
|
|
|
@ -740,7 +740,7 @@ class TDTestCase:
|
||||||
tdLog.info(f"create {func_name} functions success, using {self.libchange_udf_normal}")
|
tdLog.info(f"create {func_name} functions success, using {self.libchange_udf_normal}")
|
||||||
break
|
break
|
||||||
|
|
||||||
tdSql.query(f"select {func_name}(c8) from db.t1")
|
tdSql.error(f"select {func_name}(c8) from db.t1", TSDB_CODE_TSC_INTERNAL_ERROR)
|
||||||
tdSql.execute(f"drop function {func_name}")
|
tdSql.execute(f"drop function {func_name}")
|
||||||
tdSql.error(f"select {func_name}(num1) from db.tb", TSDB_CODE_MND_FUNC_NOT_EXIST)
|
tdSql.error(f"select {func_name}(num1) from db.tb", TSDB_CODE_MND_FUNC_NOT_EXIST)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue