fix: taosbenchmark coverity scan issues (#17361)

* fix: taosbenchmark coverity scan issues

* fix: taosbenchmark default json case

* fix: update taos-tools 217a267
This commit is contained in:
Shuduo Sang 2022-10-15 22:12:26 +08:00 committed by GitHub
parent 31e712c16b
commit 5967e35afd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 6 deletions

View File

@ -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 d58230c GIT_TAG 217a267
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

View File

@ -32,6 +32,10 @@ class TDTestCase:
if "community" in selfPath: if "community" in selfPath:
projPath = selfPath[: selfPath.find("community")] projPath = selfPath[: selfPath.find("community")]
elif "src" in selfPath:
projPath = selfPath[: selfPath.find("src")]
elif "/tools/" in selfPath:
projPath = selfPath[: selfPath.find("/tools/")]
else: else:
projPath = selfPath[: selfPath.find("tests")] projPath = selfPath[: selfPath.find("tests")]
@ -55,11 +59,10 @@ class TDTestCase:
tdLog.info("%s" % cmd) tdLog.info("%s" % cmd)
os.system("%s" % cmd) os.system("%s" % cmd)
tdSql.execute("reset query cache") tdSql.execute("reset query cache")
tdSql.query("select count(*) from (select distinct(tbname) from db.stb)") tdSql.query("show db.tables")
tdSql.checkData(0, 0, 10) tdSql.checkRows(10)
tdSql.query("select count(*) from db.stb") tdSql.query("select count(*) from db.stb")
if len(tdSql.queryResult): tdSql.checkData(0, 0, 100)
tdLog.exit("query result is %d" % len(tdSql.queryResult))
def stop(self): def stop(self):
tdSql.close() tdSql.close()

View File

@ -20,8 +20,10 @@
"super_tables": [{ "super_tables": [{
"name": "stb", "name": "stb",
"childtable_prefix": "stb_", "childtable_prefix": "stb_",
"childtable_count": 10,
"insert_rows": 10,
"columns": [{"type": "INT"}], "columns": [{"type": "INT"}],
"tags": [{"type": "INT"}] "tags": [{"type": "INT"}]
}] }]
}] }]
} }