fix: add check case

This commit is contained in:
Alex Duan 2025-02-11 15:01:12 +08:00
parent db0e07dd04
commit fde835b450
2 changed files with 30 additions and 1 deletions

View File

@ -21,16 +21,31 @@ from frame.sql import *
from frame.caseBase import *
from frame import *
class TDTestCase(TBase):
def caseDescription(self):
"""
[TD-11510] taosBenchmark test cases
"""
def checkVersion(self):
# run
outputs = etool.runBinFile("taosBenchmark", "-V")
print(outputs)
if len(outputs) != 3:
tdLog.exit(f"checkVersion return lines count {len(outputs) != 3}")
# version string len
assert len(outputs[0]) > 34
assert len(outputs[1]) > 43
assert len(outputs[2]) > 36
tdLog.info("check taosBenchmark version successfully.")
def run(self):
# check version
self.checkVersion()
# command line
binPath = etool.benchMarkFile()
cmd = (
"%s -F 7 -n 10 -t 2 -x -y -M -C -d newtest -l 5 -A binary,nchar\(31\) -b tinyint,binary\(23\),bool,nchar -w 29 -E -m $%%^*"

View File

@ -27,10 +27,24 @@ class TDTestCase(TBase):
case1<sdsang>: [TS-3072] taosdump dump escaped db name test
"""
def checkVersion(self):
# run
outputs = etool.runBinFile("taosdump", "-V")
print(outputs)
if len(outputs) != 3:
tdLog.exit(f"checkVersion return lines count {len(outputs) != 3}")
# version string len
assert len(outputs[0]) > 34
assert len(outputs[1]) > 43
assert len(outputs[2]) > 36
tdLog.info("check taosdump version successfully.")
def run(self):
# check version
self.checkVersion()
tdSql.prepare()
tdSql.execute("drop database if exists db")