fix: taosbenchmark stmt + csv rework (#17194)
* fix: taosbenchmark stmt + csv rework * test: change default_json.py to align with doc
This commit is contained in:
parent
67f2d102bc
commit
3f22971eb4
|
@ -2,7 +2,7 @@
|
||||||
# taos-tools
|
# taos-tools
|
||||||
ExternalProject_Add(taos-tools
|
ExternalProject_Add(taos-tools
|
||||||
GIT_REPOSITORY https://github.com/taosdata/taos-tools.git
|
GIT_REPOSITORY https://github.com/taosdata/taos-tools.git
|
||||||
GIT_TAG 70f5a1c
|
GIT_TAG 85179e9
|
||||||
SOURCE_DIR "${TD_SOURCE_DIR}/tools/taos-tools"
|
SOURCE_DIR "${TD_SOURCE_DIR}/tools/taos-tools"
|
||||||
BINARY_DIR ""
|
BINARY_DIR ""
|
||||||
#BUILD_IN_SOURCE TRUE
|
#BUILD_IN_SOURCE TRUE
|
||||||
|
|
|
@ -19,10 +19,9 @@ from util.dnodes import *
|
||||||
|
|
||||||
class TDTestCase:
|
class TDTestCase:
|
||||||
def caseDescription(self):
|
def caseDescription(self):
|
||||||
'''
|
"""
|
||||||
[TD-11510] taosBenchmark test cases
|
[TD-11510] taosBenchmark test cases
|
||||||
'''
|
"""
|
||||||
return
|
|
||||||
|
|
||||||
def init(self, conn, logSql):
|
def init(self, conn, logSql):
|
||||||
tdLog.debug("start to execute %s" % __file__)
|
tdLog.debug("start to execute %s" % __file__)
|
||||||
|
@ -31,19 +30,19 @@ class TDTestCase:
|
||||||
def getPath(self, tool="taosBenchmark"):
|
def getPath(self, tool="taosBenchmark"):
|
||||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||||
|
|
||||||
if ("community" in selfPath):
|
if "community" in selfPath:
|
||||||
projPath = selfPath[: selfPath.find("community")]
|
projPath = selfPath[: selfPath.find("community")]
|
||||||
else:
|
else:
|
||||||
projPath = selfPath[: selfPath.find("tests")]
|
projPath = selfPath[: selfPath.find("tests")]
|
||||||
|
|
||||||
paths = []
|
paths = []
|
||||||
for root, dirs, files in os.walk(projPath):
|
for root, dirs, files in os.walk(projPath):
|
||||||
if ((tool) in files):
|
if (tool) in files:
|
||||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||||
if ("packaging" not in rootRealPath):
|
if "packaging" not in rootRealPath:
|
||||||
paths.append(os.path.join(root, tool))
|
paths.append(os.path.join(root, tool))
|
||||||
break
|
break
|
||||||
if (len(paths) == 0):
|
if len(paths) == 0:
|
||||||
tdLog.exit("taosBenchmark not found!")
|
tdLog.exit("taosBenchmark not found!")
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
|
@ -59,7 +58,8 @@ class TDTestCase:
|
||||||
tdSql.query("select count(*) from (select distinct(tbname) from db.stb)")
|
tdSql.query("select count(*) from (select distinct(tbname) from db.stb)")
|
||||||
tdSql.checkData(0, 0, 10)
|
tdSql.checkData(0, 0, 10)
|
||||||
tdSql.query("select count(*) from db.stb")
|
tdSql.query("select count(*) from db.stb")
|
||||||
tdSql.checkData(0, 0, 100)
|
if len(tdSql.queryResult):
|
||||||
|
tdLog.exit("query result is %d" % len(tdSql.queryResult))
|
||||||
|
|
||||||
def stop(self):
|
def stop(self):
|
||||||
tdSql.close()
|
tdSql.close()
|
||||||
|
|
Loading…
Reference in New Issue