diff --git a/src/kit/taos-tools b/src/kit/taos-tools index f03c09a9f0882949b52f34f11607808ee17bfbc5..85179e99785182bb630832216f887ef84ca23474 160000 --- a/src/kit/taos-tools +++ b/src/kit/taos-tools @@ -1 +1 @@ -Subproject commit f03c09a9f0882949b52f34f11607808ee17bfbc5 +Subproject commit 85179e99785182bb630832216f887ef84ca23474 diff --git a/tests/develop-test/5-taos-tools/taosbenchmark/default_json.py b/tests/develop-test/5-taos-tools/taosbenchmark/default_json.py index a84fe0627484d594ffd0d32bcc4d4ea581ab66ec..91c56c6a60ae5fa1d3ebf02fad7ec4483a13f59c 100644 --- a/tests/develop-test/5-taos-tools/taosbenchmark/default_json.py +++ b/tests/develop-test/5-taos-tools/taosbenchmark/default_json.py @@ -19,10 +19,9 @@ from util.dnodes import * class TDTestCase: def caseDescription(self): - ''' + """ [TD-11510] taosBenchmark test cases - ''' - return + """ def init(self, conn, logSql): tdLog.debug("start to execute %s" % __file__) @@ -31,19 +30,19 @@ class TDTestCase: def getPath(self, tool="taosBenchmark"): selfPath = os.path.dirname(os.path.realpath(__file__)) - if ("community" in selfPath): - projPath = selfPath[:selfPath.find("community")] + if "community" in selfPath: + projPath = selfPath[: selfPath.find("community")] else: - projPath = selfPath[:selfPath.find("tests")] + projPath = selfPath[: selfPath.find("tests")] paths = [] for root, dirs, files in os.walk(projPath): - if ((tool) in files): + if (tool) in files: 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)) break - if (len(paths) == 0): + if len(paths) == 0: tdLog.exit("taosBenchmark not found!") return else: @@ -52,14 +51,15 @@ class TDTestCase: def run(self): binPath = self.getPath() - cmd = "%s -f ./5-taos-tools/taosbenchmark/json/default.json" %binPath + cmd = "%s -f ./5-taos-tools/taosbenchmark/json/default.json" % binPath tdLog.info("%s" % cmd) os.system("%s" % cmd) tdSql.execute("reset query cache") tdSql.query("select count(tbname) from db.stb") tdSql.checkData(0, 0, 10) 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): tdSql.close() @@ -67,4 +67,4 @@ class TDTestCase: tdCases.addWindows(__file__, TDTestCase()) -tdCases.addLinux(__file__, TDTestCase()) \ No newline at end of file +tdCases.addLinux(__file__, TDTestCase())