fix: replace getPath with etools function
This commit is contained in:
parent
7a961f1d1f
commit
5cb8a5de3c
|
@ -23,12 +23,23 @@ import frame.epath
|
|||
import frame.eos
|
||||
from frame.log import *
|
||||
|
||||
# run taosBenchmark with command or json file mode
|
||||
def benchMark(command = "", json = "") :
|
||||
# get taosBenchmark path
|
||||
def taosDumpFile():
|
||||
bmFile = frame.epath.binFile("taosdump")
|
||||
if frame.eos.isWin():
|
||||
bmFile += ".exe"
|
||||
return bmFile
|
||||
|
||||
|
||||
def benchMarkFile():
|
||||
bmFile = frame.epath.binFile("taosBenchmark")
|
||||
if frame.eos.isWin():
|
||||
bmFile += ".exe"
|
||||
return bmFile
|
||||
|
||||
# run taosBenchmark with command or json file mode
|
||||
def benchMark(command = "", json = "") :
|
||||
# get taosBenchmark path
|
||||
bmFile = benchMarkFile()
|
||||
|
||||
# run
|
||||
if command != "":
|
||||
|
|
|
@ -12,10 +12,14 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
import json
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
# reomve single and double quotation
|
||||
|
@ -27,42 +31,12 @@ def removeQuotation(origin):
|
|||
|
||||
return value
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-11510] taosBenchmark test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
else:
|
||||
projPath = selfPath[: selfPath.find("tests")]
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def testBenchmarkJson(self, benchmark, jsonFile, options="", checkStep=False):
|
||||
# exe insert
|
||||
cmd = f"{benchmark} {options} -f {jsonFile}"
|
||||
|
@ -132,33 +106,33 @@ class TDTestCase:
|
|||
|
||||
# bugs ts
|
||||
def bugsTS(self, benchmark):
|
||||
self.testBenchmarkJson(benchmark, "./taosbenchmark/json/TS-5002.json")
|
||||
self.testBenchmarkJson(benchmark, "./tools/benchmark/basic/json/TS-5002.json")
|
||||
# TS-5234
|
||||
self.testBenchmarkJson(benchmark, "./taosbenchmark/json/TS-5234-1.json")
|
||||
self.testBenchmarkJson(benchmark, "./taosbenchmark/json/TS-5234-2.json")
|
||||
self.testBenchmarkJson(benchmark, "./taosbenchmark/json/TS-5234-3.json")
|
||||
self.testBenchmarkJson(benchmark, "./tools/benchmark/basic/json/TS-5234-1.json")
|
||||
self.testBenchmarkJson(benchmark, "./tools/benchmark/basic/json/TS-5234-2.json")
|
||||
self.testBenchmarkJson(benchmark, "./tools/benchmark/basic/json/TS-5234-3.json")
|
||||
|
||||
# bugs td
|
||||
def bugsTD(self, benchmark):
|
||||
self.testBenchmarkJson(benchmark, "./taosbenchmark/json/TD-31490.json", checkStep = False)
|
||||
self.testBenchmarkJson(benchmark, "./taosbenchmark/json/TD-31575.json")
|
||||
self.testBenchmarkJson(benchmark, "./taosbenchmark/json/TD-32846.json")
|
||||
self.testBenchmarkJson(benchmark, "./tools/benchmark/basic/json/TD-31490.json", checkStep = False)
|
||||
self.testBenchmarkJson(benchmark, "./tools/benchmark/basic/json/TD-31575.json")
|
||||
self.testBenchmarkJson(benchmark, "./tools/benchmark/basic/json/TD-32846.json")
|
||||
|
||||
# no drop
|
||||
db = "td32913db"
|
||||
vgroups = 4
|
||||
tdSql.execute(f"create database {db} vgroups {vgroups}")
|
||||
self.testBenchmarkJson(benchmark, "./taosbenchmark/json/TD-32913.json", options="-Q")
|
||||
self.testBenchmarkJson(benchmark, "./tools/benchmark/basic/json/TD-32913.json", options="-Q")
|
||||
tdSql.query(f"select `vgroups` from information_schema.ins_databases where name='{db}';")
|
||||
tdSql.checkData(0, 0, vgroups)
|
||||
|
||||
# other
|
||||
self.testBenchmarkJson(benchmark, "./taosbenchmark/json/TD-32913-1.json")
|
||||
self.testBenchmarkJson(benchmark, "./taosbenchmark/json/TD-32913-2.json", options="-T 6")
|
||||
self.testBenchmarkJson(benchmark, "./taosbenchmark/json/TD-32913-3.json")
|
||||
self.testBenchmarkJson(benchmark, "./tools/benchmark/basic/json/TD-32913-1.json")
|
||||
self.testBenchmarkJson(benchmark, "./tools/benchmark/basic/json/TD-32913-2.json", options="-T 6")
|
||||
self.testBenchmarkJson(benchmark, "./tools/benchmark/basic/json/TD-32913-3.json")
|
||||
|
||||
def run(self):
|
||||
benchmark = self.getPath()
|
||||
benchmark = etool.benchMarkFile()
|
||||
|
||||
# ts
|
||||
self.bugsTS(benchmark)
|
||||
|
|
|
@ -12,50 +12,23 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-19387] taosBenchmark support partial columns num
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("cannot found %s in path: %s, use system's" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin/"
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
return ""
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
binPath = etool.benchMarkFile()
|
||||
cmd = "%s -t 1 -n 1 -y -L 2 " % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
|
|
|
@ -13,50 +13,25 @@
|
|||
import os
|
||||
import subprocess
|
||||
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-19985] taosBenchmark retry test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("cannot found %s in path: %s, use system's" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin/"
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
return ""
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
binPath = etool.benchMarkFile()
|
||||
cmd = (
|
||||
"%s -t 1 -n 10 -i 1000 -r 1 -k 10 -z 1000 -y &"
|
||||
# "%s -t 1 -n 10 -i 5000 -r 1 -y &"
|
||||
|
|
|
@ -12,50 +12,25 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-21063] taosBenchmark single table test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("cannot found %s in path: %s, use system's" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin/"
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
return ""
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
binPath = etool.benchMarkFile()
|
||||
|
||||
cmd = "%s -N -I taosc -t 1 -n 1 -y -E" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
|
|
|
@ -12,51 +12,25 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
def getPath(tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("cannot found %s in path: %s, use system's" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin/"
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
return ""
|
||||
return paths[0]
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-22334] taosBenchmark sml rest test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def run(self):
|
||||
binPath = getPath()
|
||||
binPath = etool.benchMarkFile()
|
||||
|
||||
cmd = "%s -I sml-rest -t 1 -n 1 -y" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
|
|
|
@ -13,13 +13,16 @@
|
|||
import os
|
||||
import time
|
||||
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
def getPath(tool="taosBenchmark"):
|
||||
def etool.benchMarkFile()
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
|
@ -46,15 +49,12 @@ def getPath(tool="taosBenchmark"):
|
|||
return paths[0]
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-21932] taosBenchmark sml test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def run(self):
|
||||
binPath = getPath()
|
||||
|
|
|
@ -12,50 +12,25 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-19352] taosBenchmark supplement insert test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("cannot found %s in path: %s, use system's" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin/"
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
return ""
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
binPath = etool.benchMarkFile()
|
||||
cmd = "%s -t 1 -n 1 -y" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
|
|
|
@ -12,50 +12,25 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-21806] taosBenchmark specifying vgroups test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("cannot found %s in path: %s, use system's" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin/"
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
return ""
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
binPath = etool.benchMarkFile()
|
||||
cmd = (
|
||||
"%s -t 1 -n 1 -v 3 -y &"
|
||||
% binPath
|
||||
|
|
|
@ -13,50 +13,25 @@
|
|||
import os
|
||||
import subprocess
|
||||
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-11510] taosBenchmark test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("cannot found %s in path: %s, use system's" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin/"
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
return ""
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
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 $%%^*"
|
||||
% binPath
|
||||
|
|
|
@ -11,51 +11,26 @@
|
|||
|
||||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-13928] taosBenchmark improve user interface
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
else:
|
||||
projPath = selfPath[: selfPath.find("tests")]
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
cmd = "%s -f ./taosbenchmark/json/custom_col_tag.json" % binPath
|
||||
binPath = etool.benchMarkFile()
|
||||
cmd = "%s -f ./tools/benchmark/basic/json/custom_col_tag.json" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
|
|
|
@ -11,51 +11,26 @@
|
|||
|
||||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-11510] taosBenchmark test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
else:
|
||||
projPath = selfPath[: selfPath.find("tests")]
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
cmd = "%s -f ./taosbenchmark/json/default.json" % binPath
|
||||
binPath = etool.benchMarkFile()
|
||||
cmd = "%s -f ./tools/benchmark/basic/json/default.json" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
|
|
|
@ -13,59 +13,34 @@
|
|||
# import os, signal
|
||||
import os
|
||||
from time import sleep
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-11510] taosBenchmark test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
else:
|
||||
projPath = selfPath[: selfPath.find("tests")]
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
tdSql.execute("drop topic if exists topic_0")
|
||||
binPath = self.getPath()
|
||||
cmd = "%s -f ./taosbenchmark/json/default.json" % binPath
|
||||
binPath = etool.benchMarkFile()
|
||||
cmd = "%s -f ./tools/benchmark/basic/json/default.json" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
|
||||
tdSql.execute("alter database db WAL_RETENTION_PERIOD 3600000")
|
||||
|
||||
cmd = "%s -f ./taosbenchmark/json/tmq.json " % binPath
|
||||
cmd = "%s -f ./tools/benchmark/basic/json/tmq.json " % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
sleep(15)
|
||||
|
|
|
@ -12,50 +12,25 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-13823] taosBenchmark test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
else:
|
||||
projPath = selfPath[: selfPath.find("tests")]
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
binPath = etool.benchMarkFile()
|
||||
cmd = "%s -n 100 -t 100 -y" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
|
|
|
@ -14,10 +14,13 @@ import os
|
|||
import json
|
||||
import csv
|
||||
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
# reomve single and double quotation
|
||||
|
@ -29,41 +32,13 @@ def removeQuotation(origin):
|
|||
|
||||
return value
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-11510] taosBenchmark test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
else:
|
||||
projPath = selfPath[: selfPath.find("tests")]
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
# check correct
|
||||
def checkCorrect(self, csvFile, allRows, interlaceRows):
|
||||
|
@ -132,7 +107,7 @@ class TDTestCase:
|
|||
|
||||
def run(self):
|
||||
# path
|
||||
benchmark = self.getPath()
|
||||
benchmark = etool.benchMarkFile()
|
||||
|
||||
# do check
|
||||
json = "taosbenchmark/json/exportCsv.json"
|
||||
|
|
|
@ -12,81 +12,56 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-20424] taosBenchmark insert child table from and to test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("cannot found %s in path: %s, use system's" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin/"
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
return ""
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
binPath = etool.benchMarkFile()
|
||||
cmd = "%s -t 6 -n 1 -y" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
|
||||
cmd = "%s -f ./taosbenchmark/json/insert-from-to-continue-no.json" % binPath
|
||||
cmd = "%s -f ./tools/benchmark/basic/json/insert-from-to-continue-no.json" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.query("select count(*) from test.meters")
|
||||
tdSql.checkData(0, 0, 6 + 3)
|
||||
|
||||
binPath = self.getPath()
|
||||
binPath = etool.benchMarkFile()
|
||||
cmd = "%s -t 5 -n 1 -y" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("use test")
|
||||
tdSql.execute("create table d5 using meters tags (4, 'd5')")
|
||||
|
||||
cmd = "%s -f ./taosbenchmark/json/insert-from-to-continue-yes.json" % binPath
|
||||
cmd = "%s -f ./tools/benchmark/basic/json/insert-from-to-continue-yes.json" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.query("select count(*) from test.meters")
|
||||
tdSql.checkData(0, 0, 5 + 3)
|
||||
|
||||
binPath = self.getPath()
|
||||
binPath = etool.benchMarkFile()
|
||||
cmd = "%s -t 4 -n 1 -y" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("use test")
|
||||
tdSql.execute("create table d4 using meters tags (4, 'd4')")
|
||||
|
||||
cmd = "%s -f ./taosbenchmark/json/insert-from-to-continue-smart.json" % binPath
|
||||
cmd = "%s -f ./tools/benchmark/basic/json/insert-from-to-continue-smart.json" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.query("select count(*) from test.meters")
|
||||
|
|
|
@ -12,56 +12,29 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-22157] taosBenchmark insert child table from and to test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("cannot found %s in path: %s, use system's" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin/"
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
tdSql.query("select client_version()")
|
||||
client_ver = "".join(tdSql.queryResult[0])
|
||||
major_ver = client_ver.split(".")[0]
|
||||
|
||||
binPath = self.getPath()
|
||||
binPath = etool.benchMarkFile()
|
||||
|
||||
cmd = "%s -f ./taosbenchmark/json/from-to.json" % binPath
|
||||
cmd = "%s -f ./tools/benchmark/basic/json/from-to.json" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.query("select count(*) from db.stb")
|
||||
|
|
|
@ -13,52 +13,27 @@
|
|||
|
||||
import os
|
||||
import time
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
class TDTestCase(TBase):
|
||||
|
||||
now = time.time()
|
||||
self.ts = int(round(now * 1000))
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
else:
|
||||
projPath = selfPath[: selfPath.find("tests")]
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
tdSql.query("select client_version()")
|
||||
client_ver = "".join(tdSql.queryResult[0])
|
||||
major_ver = client_ver.split(".")[0]
|
||||
|
||||
binPath = self.getPath("taosBenchmark")
|
||||
binPath = etool.benchMarkFile()
|
||||
if binPath == "":
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
else:
|
||||
|
@ -66,7 +41,7 @@ class TDTestCase:
|
|||
|
||||
# insert: create one or multiple tables per sql and insert multiple rows per sql
|
||||
# test case for https://jira.taosdata.com:18080/browse/TD-4985
|
||||
os.system("%s -f ./taosbenchmark/json/insert-json-csv.json -y " % binPath)
|
||||
os.system("%s -f ./tools/benchmark/basic/json/insert-json-csv.json -y " % binPath)
|
||||
|
||||
tdSql.execute("use db")
|
||||
if major_ver == "3":
|
||||
|
|
|
@ -11,50 +11,25 @@
|
|||
|
||||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-11510] taosBenchmark test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
else:
|
||||
projPath = selfPath[: selfPath.find("tests")]
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
binPath = etool.benchMarkFile()
|
||||
cmd = (
|
||||
"%s -F abc -P abc -I abc -T abc -i abc -S abc -B abc -r abc -t abc -n abc -l abc -w abc -w 16385 -R abc -O abc -a abc -n 2 -t 2 -r 1 -y"
|
||||
% binPath
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
"timestamp_step": 0,
|
||||
"start_timestamp": "2020-1-1 0:0:0",
|
||||
"sample_format": "csv",
|
||||
"sample_file": "./taosbenchmark/csv/TD-31490.csv",
|
||||
"sample_file": "./tools/benchmark/basic/csv/TD-31490.csv",
|
||||
"use_sample_ts": "yes",
|
||||
"tags_file": "",
|
||||
"columns": [
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
"disorder_range": 0,
|
||||
"timestamp_step": 900000,
|
||||
"start_timestamp": "2024-6-01 0:0:0",
|
||||
"tags_file": "./taosbenchmark/csv/TS-5002.csv",
|
||||
"tags_file": "./tools/benchmark/basic/csv/TS-5002.csv",
|
||||
"columns": [
|
||||
{
|
||||
"type": "FLOAT",
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
"timestamp_step": 1,
|
||||
"start_timestamp": "2022-10-01 00:00:00.000",
|
||||
"sample_format": "csv",
|
||||
"sample_file": "./taosbenchmark/csv/insert-json-csv.csv",
|
||||
"sample_file": "./tools/benchmark/basic/csv/insert-json-csv.csv",
|
||||
"columns": [{"type": "INT","count":2}, {"type": "BINARY", "len": 16, "count":1}],
|
||||
"tags": [{"type": "INT", "count":2}, {"type": "BINARY", "len": 16, "count":1}]
|
||||
}]
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
"timestamp_step": 1,
|
||||
"start_timestamp": "2020-10-01 00:00:00.000",
|
||||
"sample_format": "csv",
|
||||
"sample_file": "./taosbenchmark/csv/sample_ts.csv",
|
||||
"sample_file": "./tools/benchmark/basic/csv/sample_ts.csv",
|
||||
"use_sample_ts": "yes",
|
||||
"tags_file": "",
|
||||
"columns": [{"type": "INT", "count":3}, {"type": "DOUBLE", "count":3}, {"type": "BINARY", "len": 16, "count":1}, {"type": "BINARY", "len": 32, "count":1}, {"type": "BOOL"}],
|
||||
|
@ -68,7 +68,7 @@
|
|||
"start_timestamp": "2020-10-01 00:00:00.000",
|
||||
"sample_format": "csv",
|
||||
"sample_file": "./sample.csv",
|
||||
"tags_file": "./taosbenchmark/csv/sample_ts_stmt_tags.csv",
|
||||
"tags_file": "./tools/benchmark/basic/csv/sample_ts_stmt_tags.csv",
|
||||
"columns": [{"type": "INT"}, {"type": "DOUBLE", "count":10}, {"type": "BINARY", "len": 16, "count":3}, {"type": "BINARY", "len": 32, "count":6}],
|
||||
"tags": [{"type": "TINYINT", "count":3}, {"type": "BINARY", "len": 16, "count":2}]
|
||||
}]
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
"timestamp_step": 1,
|
||||
"start_timestamp": "2020-10-01 00:00:00.000",
|
||||
"sample_format": "csv",
|
||||
"sample_file": "./taosbenchmark/csv/sample_ts.csv",
|
||||
"sample_file": "./tools/benchmark/basic/csv/sample_ts.csv",
|
||||
"use_sample_ts": "yes",
|
||||
"tags_file": "",
|
||||
"columns": [{"type": "INT", "count":3}, {"type": "DOUBLE", "count":3}, {"type": "BINARY", "len": 16, "count":1}, {"type": "BINARY", "len": 32, "count":1}, {"type": "BOOL"}],
|
||||
|
@ -67,8 +67,8 @@
|
|||
"timestamp_step": 10,
|
||||
"start_timestamp": "2020-10-01 00:00:00.000",
|
||||
"sample_format": "csv",
|
||||
"sample_file": "./taosbenchmark/csv/sample.csv",
|
||||
"tags_file": "./taosbenchmark/csv/tags.csv",
|
||||
"sample_file": "./tools/benchmark/basic/csv/sample.csv",
|
||||
"tags_file": "./tools/benchmark/basic/csv/tags.csv",
|
||||
"columns": [{"type": "INT"}, {"type": "DOUBLE", "count":10}, {"type": "BINARY", "len": 16, "count":3}, {"type": "BINARY", "len": 32, "count":6}],
|
||||
"tags": [{"type": "TINYINT", "count":3}, {"type": "BINARY", "len": 16, "count":2}]
|
||||
}]
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
"timestamp_step": 1,
|
||||
"start_timestamp": "2020-10-01 00:00:00.000",
|
||||
"sample_format": "csv",
|
||||
"sample_file": "./taosbenchmark/csv/sample.csv",
|
||||
"sample_file": "./tools/benchmark/basic/csv/sample.csv",
|
||||
"tags_file": "",
|
||||
"columns": [{"type": "INT", "count":3}, {"type": "DOUBLE", "count":3}, {"type": "BINARY", "len": 16, "count":1}, {"type": "BINARY", "len": 32, "count":1}, {"type": "BOOL"}],
|
||||
"tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}]
|
||||
|
@ -78,8 +78,8 @@
|
|||
"timestamp_step": 10,
|
||||
"start_timestamp": "2020-10-01 00:00:00.000",
|
||||
"sample_format": "csv",
|
||||
"sample_file": "./taosbenchmark/csv/sample.csv",
|
||||
"tags_file": "./taosbenchmark/csv/tags.csv",
|
||||
"sample_file": "./tools/benchmark/basic/csv/sample.csv",
|
||||
"tags_file": "./tools/benchmark/basic/csv/tags.csv",
|
||||
"columns": [{"type": "INT"}, {"type": "DOUBLE", "count":10}, {"type": "BINARY", "len": 16, "count":3}, {"type": "BINARY", "len": 32, "count":6}],
|
||||
"tags": [{"type": "TINYINT", "count":3}, {"type": "BINARY", "len": 16, "count":2}]
|
||||
}]
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
"start_timestamp":1700000000000,
|
||||
"auto_create_table": "no",
|
||||
"data_source": "sample",
|
||||
"sample_file": "./taosbenchmark/csv/d0.csv",
|
||||
"sample_file": "./tools/benchmark/basic/csv/d0.csv",
|
||||
"use_sample_ts": "yes",
|
||||
"columns": [
|
||||
{"type": "FLOAT", "name": "current", "count": 1, "max": 12, "min": 8 },
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
"start_timestamp":1700000000000,
|
||||
"auto_create_table": "yes",
|
||||
"data_source": "sample",
|
||||
"sample_file": "./taosbenchmark/csv/d0.csv",
|
||||
"sample_file": "./tools/benchmark/basic/csv/d0.csv",
|
||||
"use_sample_ts": "yes",
|
||||
"columns": [
|
||||
{"type": "FLOAT", "name": "current", "count": 1, "max": 12, "min": 8 },
|
||||
|
|
|
@ -39,9 +39,9 @@
|
|||
"disorder_range": 1000,
|
||||
"timestamp_step": 1,
|
||||
"start_timestamp": "now",
|
||||
"sample_file": "./taosbenchmark/csv/sample_no_ts.csv",
|
||||
"sample_file": "./tools/benchmark/basic/csv/sample_no_ts.csv",
|
||||
"use_sample_ts": "no",
|
||||
"tags_file": "./taosbenchmark/csv/sample_tags.csv",
|
||||
"tags_file": "./tools/benchmark/basic/csv/sample_tags.csv",
|
||||
"columns": [{"type": "INT"}],
|
||||
"tags": [{"type": "INT"}]
|
||||
}]
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
"child_table_exists":"no",
|
||||
"childtable_count": 8,
|
||||
"childtable_prefix": "stb",
|
||||
"childtable_sample_file": "./taosbenchmark/csv/sample_use_ts-XXXX.csv",
|
||||
"childtable_sample_file": "./tools/benchmark/basic/csv/sample_use_ts-XXXX.csv",
|
||||
"escape_character": "no",
|
||||
"auto_create_table": "no",
|
||||
"batch_create_tbl_num": 10,
|
||||
|
@ -39,9 +39,9 @@
|
|||
"disorder_range": 1000,
|
||||
"timestamp_step": 1,
|
||||
"start_timestamp": "now",
|
||||
"sample_file": "./taosbenchmark/csv/sample_use_ts.csv",
|
||||
"sample_file": "./tools/benchmark/basic/csv/sample_use_ts.csv",
|
||||
"use_sample_ts": "yes",
|
||||
"tags_file": "./taosbenchmark/csv/sample_tags.csv",
|
||||
"tags_file": "./tools/benchmark/basic/csv/sample_tags.csv",
|
||||
"columns": [{"type": "INT"}],
|
||||
"tags": [{"type": "INT"}]
|
||||
}]
|
||||
|
|
|
@ -39,9 +39,9 @@
|
|||
"disorder_range": 1000,
|
||||
"timestamp_step": 1,
|
||||
"start_timestamp": "now",
|
||||
"sample_file": "./taosbenchmark/csv/sample_use_ts.csv",
|
||||
"sample_file": "./tools/benchmark/basic/csv/sample_use_ts.csv",
|
||||
"use_sample_ts": "yes",
|
||||
"tags_file": "./taosbenchmark/csv/sample_tags.csv",
|
||||
"tags_file": "./tools/benchmark/basic/csv/sample_tags.csv",
|
||||
"columns": [{"type": "INT"}],
|
||||
"tags": [{"type": "INT"}]
|
||||
}]
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
{
|
||||
"query_interval": 1,
|
||||
"concurrent":1,
|
||||
"sql_file": "./taosbenchmark/json/query-error-sqls.txt",
|
||||
"sql_file": "./tools/benchmark/basic/json/query-error-sqls.txt",
|
||||
"result": "taosc_query_specified-sqlfile"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,6 +14,6 @@
|
|||
"specified_table_query": {
|
||||
"query_interval": 3,
|
||||
"concurrent": 3,
|
||||
"sql_file": "./taosbenchmark/json/query-sqls-slow-query.txt"
|
||||
"sql_file": "./tools/benchmark/basic/json/query-sqls-slow-query.txt"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
{
|
||||
"query_interval": 1,
|
||||
"concurrent":1,
|
||||
"sql_file": "./taosbenchmark/json/query-sqls.txt",
|
||||
"sql_file": "./tools/benchmark/basic/json/query-sqls.txt",
|
||||
"result": "taosc_query_specified-sqlfile"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
"child_table_exists":"no",
|
||||
"childtable_count": 8,
|
||||
"childtable_prefix": "stb",
|
||||
"childtable_sample_file": "./taosbenchmark/csv/sample_use_ts-XXXX.csv",
|
||||
"childtable_sample_file": "./tools/benchmark/basic/csv/sample_use_ts-XXXX.csv",
|
||||
"escape_character": "no",
|
||||
"auto_create_table": "no",
|
||||
"batch_create_tbl_num": 10,
|
||||
|
@ -39,9 +39,9 @@
|
|||
"disorder_range": 1000,
|
||||
"timestamp_step": 1,
|
||||
"start_timestamp": "now",
|
||||
"sample_file": "./taosbenchmark/csv/sample_use_ts.csv",
|
||||
"sample_file": "./tools/benchmark/basic/csv/sample_use_ts.csv",
|
||||
"use_sample_ts": "yes",
|
||||
"tags_file": "./taosbenchmark/csv/sample_tags.csv",
|
||||
"tags_file": "./tools/benchmark/basic/csv/sample_tags.csv",
|
||||
"columns": [{"type": "INT"}],
|
||||
"tags": [{"type": "INT"}]
|
||||
}]
|
||||
|
|
|
@ -39,9 +39,9 @@
|
|||
"disorder_range": 1000,
|
||||
"timestamp_step": 1,
|
||||
"start_timestamp": "now",
|
||||
"sample_file": "./taosbenchmark/csv/sample_use_ts.csv",
|
||||
"sample_file": "./tools/benchmark/basic/csv/sample_use_ts.csv",
|
||||
"use_sample_ts": "yes",
|
||||
"tags_file": "./taosbenchmark/csv/sample_tags.csv",
|
||||
"tags_file": "./tools/benchmark/basic/csv/sample_tags.csv",
|
||||
"columns": [{"type": "INT"}],
|
||||
"tags": [{"type": "INT"}]
|
||||
}]
|
||||
|
|
|
@ -50,8 +50,8 @@
|
|||
"timestamp_step": 10000000,
|
||||
"start_timestamp": "2021-07-01 00:00:00.000",
|
||||
"sample_format": "csv",
|
||||
"sample_file": "./taosbenchmark/csv/nano_samples.csv",
|
||||
"tags_file": "./taosbenchmark/csv/nano_sampletags.csv",
|
||||
"sample_file": "./tools/benchmark/basic/csv/nano_samples.csv",
|
||||
"tags_file": "./tools/benchmark/basic/csv/nano_sampletags.csv",
|
||||
"columns": [{"type": "DOUBLE"}, {"type": "BINARY", "len": 64, "count":1}, {"type": "TIMESTAMP", "count":1}],
|
||||
"tags": [{"type": "BINARY", "len": 16, "count":1},{"type": "INT"},{"type": "DOUBLE"}]
|
||||
},
|
||||
|
@ -74,8 +74,8 @@
|
|||
"timestamp_step": 10000000,
|
||||
"start_timestamp": "2021-07-01 00:00:00.000",
|
||||
"sample_format": "csv",
|
||||
"sample_file": "./taosbenchmark/csv/nano_samples.csv",
|
||||
"tags_file": "./taosbenchmark/csv/nano_sampletags.csv",
|
||||
"sample_file": "./tools/benchmark/basic/csv/nano_samples.csv",
|
||||
"tags_file": "./tools/benchmark/basic/csv/nano_sampletags.csv",
|
||||
"columns": [{"type": "DOUBLE"}, {"type": "BINARY", "len": 64, "count":1}, {"type": "TIMESTAMP", "count":1}],
|
||||
"tags": [{"type": "BINARY", "len": 16, "count":1},{"type": "INT"},{"type": "DOUBLE"}]
|
||||
}]
|
||||
|
|
|
@ -11,51 +11,26 @@
|
|||
|
||||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-11510] taosBenchmark test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
else:
|
||||
projPath = selfPath[: selfPath.find("tests")]
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
cmd = "%s -f ./taosbenchmark/json/taosc_json_tag.json" % binPath
|
||||
binPath = etool.benchMarkFile()
|
||||
cmd = "%s -f ./tools/benchmark/basic/json/taosc_json_tag.json" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
|
|
|
@ -11,51 +11,26 @@
|
|||
|
||||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-11510] taosBenchmark test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
else:
|
||||
projPath = selfPath[: selfPath.find("tests")]
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
cmd = "%s -f ./taosbenchmark/json/taosc_only_create_table.json" % binPath
|
||||
binPath = etool.benchMarkFile()
|
||||
cmd = "%s -f ./tools/benchmark/basic/json/taosc_only_create_table.json" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
|
@ -86,7 +61,7 @@ class TDTestCase:
|
|||
tdSql.checkData(23, 2, 64)
|
||||
tdSql.checkData(28, 2, 64)
|
||||
|
||||
cmd = "%s -f ./taosbenchmark/json/taosc_limit_offset.json" % binPath
|
||||
cmd = "%s -f ./tools/benchmark/basic/json/taosc_limit_offset.json" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
|
|
|
@ -13,53 +13,25 @@
|
|||
import os
|
||||
import subprocess
|
||||
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-11510] taosBenchmark test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("Cannot find %s in path: %s" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin/"
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
binPath = etool.benchMarkFile()
|
||||
|
||||
cmd = (
|
||||
"%s -b binary,nchar,binary,nchar,binary,nchar,binary,nchar,binary,nchar,binary,nchar -t 2 -n 50000 -I stmt -y > /dev/null"
|
||||
|
@ -72,7 +44,7 @@ class TDTestCase:
|
|||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
|
||||
cmd = "%s -f ./taosbenchmark/json/taosc_query-kill-slow-query.json" % binPath
|
||||
cmd = "%s -f ./tools/benchmark/basic/json/taosc_query-kill-slow-query.json" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
output = subprocess.check_output(cmd, shell=True).decode("utf-8")
|
||||
if "KILL QUERY" not in output:
|
||||
|
|
|
@ -12,50 +12,25 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-11510] taosBenchmark test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
else:
|
||||
projPath = selfPath[: selfPath.find("tests")]
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
binPath = etool.benchMarkFile()
|
||||
os.system(
|
||||
"rm -f rest_query_specified-0 rest_query_super-0 taosc_query_specified-0 taosc_query_super-0"
|
||||
)
|
||||
|
@ -66,7 +41,7 @@ class TDTestCase:
|
|||
tdSql.execute("insert into stb_0 using stb tags (0) values (now, 0)")
|
||||
tdSql.execute("insert into stb_1 using stb tags (1) values (now, 1)")
|
||||
tdSql.execute("insert into stb_2 using stb tags (2) values (now, 2)")
|
||||
cmd = "%s -f ./taosbenchmark/json/taosc_query-error-sqlfile.json" % binPath
|
||||
cmd = "%s -f ./tools/benchmark/basic/json/taosc_query-error-sqlfile.json" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
|
||||
|
|
|
@ -12,50 +12,25 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-11510] taosBenchmark test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
else:
|
||||
projPath = selfPath[: selfPath.find("tests")]
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
binPath = etool.benchMarkFile()
|
||||
os.system(
|
||||
"rm -f rest_query_specified-0 rest_query_super-0 taosc_query_specified-0 taosc_query_super-0"
|
||||
)
|
||||
|
@ -66,7 +41,7 @@ class TDTestCase:
|
|||
tdSql.execute("insert into stb_0 using stb tags (0) values (now, 0)")
|
||||
tdSql.execute("insert into stb_1 using stb tags (1) values (now, 1)")
|
||||
tdSql.execute("insert into stb_2 using stb tags (2) values (now, 2)")
|
||||
cmd = "%s -f ./taosbenchmark/json/taosc_query-sqlfile.json" % binPath
|
||||
cmd = "%s -f ./tools/benchmark/basic/json/taosc_query-sqlfile.json" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
|
||||
|
|
|
@ -14,53 +14,25 @@ import ast
|
|||
import os
|
||||
import re
|
||||
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-11510] taosBenchmark test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("Cannot find %s in path: %s" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin/"
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
binPath = etool.benchMarkFile()
|
||||
os.system(
|
||||
"rm -f rest_query_specified-0 rest_query_super-0 taosc_query_specified-0 taosc_query_super-0"
|
||||
)
|
||||
|
@ -71,7 +43,7 @@ class TDTestCase:
|
|||
tdSql.execute("insert into stb_0 using stb tags (0) values (now, 0)")
|
||||
tdSql.execute("insert into stb_1 using stb tags (1) values (now, 1)")
|
||||
tdSql.execute("insert into stb_2 using stb tags (2) values (now, 2)")
|
||||
cmd = "%s -f ./taosbenchmark/json/taosc_query.json" % binPath
|
||||
cmd = "%s -f ./tools/benchmark/basic/json/taosc_query.json" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
with open("%s" % "taosc_query_specified-0", "r+") as f1:
|
||||
|
@ -84,7 +56,7 @@ class TDTestCase:
|
|||
queryTaosc = line.strip().split()[0]
|
||||
assert queryTaosc == "1", "result is %s != expect: 1" % queryTaosc
|
||||
|
||||
cmd = "%s -f ./taosbenchmark/json/rest_query.json" % binPath
|
||||
cmd = "%s -f ./tools/benchmark/basic/json/rest_query.json" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
|
||||
|
|
|
@ -11,53 +11,25 @@
|
|||
|
||||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-11510] taosBenchmark test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
else:
|
||||
projPath = selfPath[: selfPath.find("tests")]
|
||||
|
||||
tdLog.info("projPath: %s" % projPath)
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
binPath = etool.benchMarkFile()
|
||||
|
||||
cmd = "%s -f ./taosbenchmark/json/rest_insert_alltypes.json" % binPath
|
||||
cmd = "%s -f ./tools/benchmark/basic/json/rest_insert_alltypes.json" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.query("select count(*) from db.stb")
|
||||
|
|
|
@ -12,64 +12,36 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-22190] taosBenchmark reuse exist stb test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("Cannot find %s in path: %s" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin/"
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
tdSql.query("select client_version()")
|
||||
client_ver = "".join(tdSql.queryResult[0])
|
||||
major_ver = client_ver.split(".")[0]
|
||||
|
||||
binPath = self.getPath()
|
||||
binPath = etool.benchMarkFile()
|
||||
tdSql.execute("drop database if exists db")
|
||||
tdSql.execute("create database if not exists db")
|
||||
tdSql.execute("use db")
|
||||
tdSql.execute("create table stb (ts timestamp, c0 int) tags (t0 int)")
|
||||
tdSql.execute("insert into stb_0 using stb tags (0) values (now, 0)")
|
||||
# sys.exit(0)
|
||||
cmd = "%s -f ./taosbenchmark/json/reuse-exist-stb.json" % binPath
|
||||
cmd = "%s -f ./tools/benchmark/basic/json/reuse-exist-stb.json" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.query("select count(*) from db.new_0")
|
||||
|
|
|
@ -11,52 +11,27 @@
|
|||
|
||||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-11510] taosBenchmark test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
else:
|
||||
projPath = selfPath[: selfPath.find("tests")]
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
binPath = etool.benchMarkFile()
|
||||
|
||||
cmd = "%s -f ./taosbenchmark/json/sml_auto_create_table.json" % binPath
|
||||
cmd = "%s -f ./tools/benchmark/basic/json/sml_auto_create_table.json" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
|
|
|
@ -11,53 +11,25 @@
|
|||
|
||||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-11510] taosBenchmark test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
else:
|
||||
projPath = selfPath[: selfPath.find("tests")]
|
||||
|
||||
tdLog.info("projPath: %s" % projPath)
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
binPath = etool.benchMarkFile()
|
||||
|
||||
cmd = "%s -f ./taosbenchmark/json/sml_insert_alltypes.json" % binPath
|
||||
cmd = "%s -f ./tools/benchmark/basic/json/sml_insert_alltypes.json" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.query("select count(*) from db.stb")
|
||||
|
|
|
@ -11,58 +11,28 @@
|
|||
|
||||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-11510] taosBenchmark test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("cannot found %s in path: %s, use system's" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin/"
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
tdSql.query("select client_version()")
|
||||
client_ver = "".join(tdSql.queryResult[0])
|
||||
major_ver = client_ver.split(".")[0]
|
||||
|
||||
binPath = self.getPath()
|
||||
cmd = "%s -f ./taosbenchmark/json/sml_interlace.json" % binPath
|
||||
binPath = etool.benchMarkFile()
|
||||
cmd = "%s -f ./tools/benchmark/basic/json/sml_interlace.json" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
|
|
|
@ -11,58 +11,28 @@
|
|||
|
||||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-21932] taosBenchmark schemaless refine
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("cannot found %s in path: %s, use system's" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin/"
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
tdSql.query("select client_version()")
|
||||
client_ver = "".join(tdSql.queryResult[0])
|
||||
major_ver = client_ver.split(".")[0]
|
||||
|
||||
binPath = self.getPath()
|
||||
cmd = "%s -f ./taosbenchmark/json/sml_json_alltypes-interlace.json" % binPath
|
||||
binPath = etool.benchMarkFile()
|
||||
cmd = "%s -f ./tools/benchmark/basic/json/sml_json_alltypes-interlace.json" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
|
|
|
@ -11,58 +11,31 @@
|
|||
|
||||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-11510] taosBenchmark test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("cannot found %s in path: %s, use system's" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin/"
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
tdSql.query("select client_version()")
|
||||
client_ver = "".join(tdSql.queryResult[0])
|
||||
major_ver = client_ver.split(".")[0]
|
||||
|
||||
binPath = self.getPath()
|
||||
cmd = "%s -f ./taosbenchmark/json/sml_json_alltypes.json" % binPath
|
||||
binPath = etool.benchMarkFile()
|
||||
cmd = "%s -f ./tools/benchmark/basic/json/sml_json_alltypes.json" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
|
|
|
@ -11,60 +11,29 @@
|
|||
|
||||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-23292] taosBenchmark test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("cannot found %s in path: %s, use system's" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin/"
|
||||
|
||||
tdLog.info("projPath: %s" % projPath)
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
tdSql.query("select client_version()")
|
||||
client_ver = "".join(tdSql.queryResult[0])
|
||||
major_ver = client_ver.split(".")[0]
|
||||
|
||||
binPath = self.getPath()
|
||||
binPath = etool.benchMarkFile()
|
||||
cmd = (
|
||||
"%s -f ./taosbenchmark/json/sml_json_insert_alltypes-same-min-max.json"
|
||||
"%s -f ./tools/benchmark/basic/json/sml_json_insert_alltypes-same-min-max.json"
|
||||
% binPath
|
||||
)
|
||||
tdLog.info("%s" % cmd)
|
||||
|
|
|
@ -11,13 +11,16 @@
|
|||
|
||||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
def getPath(tool="taosBenchmark"):
|
||||
def etool.benchMarkFile()
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
|
@ -47,15 +50,12 @@ def getPath(tool="taosBenchmark"):
|
|||
return paths[0]
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-21932] taosBenchmark sml test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def run(self):
|
||||
tdSql.query("select client_version()")
|
||||
|
@ -63,7 +63,7 @@ class TDTestCase:
|
|||
major_ver = client_ver.split(".")[0]
|
||||
|
||||
binPath = getPath()
|
||||
cmd = "%s -f ./taosbenchmark/json/sml_taosjson_alltypes.json" % binPath
|
||||
cmd = "%s -f ./tools/benchmark/basic/json/sml_taosjson_alltypes.json" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
|
|
|
@ -11,56 +11,25 @@
|
|||
|
||||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-23292] taosBenchmark test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("cannot found %s in path: %s, use system's" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin/"
|
||||
|
||||
tdLog.info("projPath: %s" % projPath)
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
binPath = etool.benchMarkFile()
|
||||
cmd = (
|
||||
"%s -f ./taosbenchmark/json/sml_taosjson_insert_alltypes-same-min-max.json"
|
||||
"%s -f ./tools/benchmark/basic/json/sml_taosjson_insert_alltypes-same-min-max.json"
|
||||
% binPath
|
||||
)
|
||||
tdLog.info("%s" % cmd)
|
||||
|
|
|
@ -11,58 +11,31 @@
|
|||
|
||||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-11510] taosBenchmark test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("cannot found %s in path: %s, use system's" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin/"
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
tdSql.query("select client_version()")
|
||||
client_ver = "".join(tdSql.queryResult[0])
|
||||
major_ver = client_ver.split(".")[0]
|
||||
|
||||
binPath = self.getPath()
|
||||
cmd = "%s -f ./taosbenchmark/json/sml_telnet_alltypes.json" % binPath
|
||||
binPath = etool.benchMarkFile()
|
||||
cmd = "%s -f ./tools/benchmark/basic/json/sml_telnet_alltypes.json" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
|
|
|
@ -11,60 +11,29 @@
|
|||
|
||||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-23292] taosBenchmark test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("cannot found %s in path: %s, use system's" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin/"
|
||||
|
||||
tdLog.info("projPath: %s" % projPath)
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
tdSql.query("select client_version()")
|
||||
client_ver = "".join(tdSql.queryResult[0])
|
||||
major_ver = client_ver.split(".")[0]
|
||||
|
||||
binPath = self.getPath()
|
||||
binPath = etool.benchMarkFile()
|
||||
cmd = (
|
||||
"%s -f ./taosbenchmark/json/sml_telnet_insert_alltypes-same-min-max.json"
|
||||
"%s -f ./tools/benchmark/basic/json/sml_telnet_insert_alltypes-same-min-max.json"
|
||||
% binPath
|
||||
)
|
||||
tdLog.info("%s" % cmd)
|
||||
|
|
|
@ -12,47 +12,22 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
import json
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-11510] taosBenchmark test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
else:
|
||||
projPath = selfPath[: selfPath.find("tests")]
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def testBenchmarkJson(self, benchmark, jsonFile):
|
||||
# exe insert
|
||||
|
@ -85,17 +60,17 @@ class TDTestCase:
|
|||
|
||||
|
||||
def run(self):
|
||||
benchmark = self.getPath()
|
||||
benchmark = etool.benchMarkFile()
|
||||
''' stmt2 engine have some problem
|
||||
# batch - auto-create-table(yes or no)
|
||||
self.testBenchmarkJson(benchmark, "./taosbenchmark/json/stmt2_insert_batch_autoctb_yes.json")
|
||||
self.testBenchmarkJson(benchmark, "./taosbenchmark/json/stmt2_insert_batch_autoctb_no.json")
|
||||
self.testBenchmarkJson(benchmark, "./tools/benchmark/basic/json/stmt2_insert_batch_autoctb_yes.json")
|
||||
self.testBenchmarkJson(benchmark, "./tools/benchmark/basic/json/stmt2_insert_batch_autoctb_no.json")
|
||||
# interlace - auto-create-table(yes or no)
|
||||
self.testBenchmarkJson(benchmark, "./taosbenchmark/json/stmt2_insert_interlace_autoctb_yes.json")
|
||||
self.testBenchmarkJson(benchmark, "./taosbenchmark/json/stmt2_insert_interlace_autoctb_no.json")
|
||||
self.testBenchmarkJson(benchmark, "./tools/benchmark/basic/json/stmt2_insert_interlace_autoctb_yes.json")
|
||||
self.testBenchmarkJson(benchmark, "./tools/benchmark/basic/json/stmt2_insert_interlace_autoctb_no.json")
|
||||
# csv - (batch or interlace)
|
||||
self.testBenchmarkJson(benchmark, "./taosbenchmark/json/stmt2_insert_csv_interlace_autoctb_yes.json")
|
||||
self.testBenchmarkJson(benchmark, "./taosbenchmark/json/stmt2_insert_csv_batch_autoctb_no.json")
|
||||
self.testBenchmarkJson(benchmark, "./tools/benchmark/basic/json/stmt2_insert_csv_interlace_autoctb_yes.json")
|
||||
self.testBenchmarkJson(benchmark, "./tools/benchmark/basic/json/stmt2_insert_csv_batch_autoctb_no.json")
|
||||
'''
|
||||
|
||||
|
||||
|
|
|
@ -11,52 +11,27 @@
|
|||
|
||||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-11510] taosBenchmark test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
else:
|
||||
projPath = selfPath[: selfPath.find("tests")]
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
binPath = etool.benchMarkFile()
|
||||
|
||||
cmd = "%s -f ./taosbenchmark/json/stmt_auto_create_table.json" % binPath
|
||||
cmd = "%s -f ./tools/benchmark/basic/json/stmt_auto_create_table.json" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
|
|
|
@ -11,56 +11,25 @@
|
|||
|
||||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-23292] taosBenchmark test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("cannot found %s in path: %s, use system's" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin/"
|
||||
|
||||
tdLog.info("projPath: %s" % projPath)
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
binPath = etool.benchMarkFile()
|
||||
cmd = (
|
||||
"%s -f ./taosbenchmark/json/stmt_insert_alltypes-same-min-max.json"
|
||||
"%s -f ./tools/benchmark/basic/json/stmt_insert_alltypes-same-min-max.json"
|
||||
% binPath
|
||||
)
|
||||
tdLog.info("%s" % cmd)
|
||||
|
|
|
@ -11,52 +11,27 @@
|
|||
|
||||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-11510] taosBenchmark test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
else:
|
||||
projPath = selfPath[: selfPath.find("tests")]
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
binPath = etool.benchMarkFile()
|
||||
|
||||
cmd = "%s -f ./taosbenchmark/json/stmt_insert_alltypes.json" % binPath
|
||||
cmd = "%s -f ./tools/benchmark/basic/json/stmt_insert_alltypes.json" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.query("select count(*) from db.stb")
|
||||
|
|
|
@ -11,51 +11,26 @@
|
|||
|
||||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TS-3060] taosBenchmark test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
else:
|
||||
projPath = selfPath[: selfPath.find("tests")]
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
cmd = "%s -f ./taosbenchmark/json/taosc_only_create_table.json" % binPath
|
||||
binPath = etool.benchMarkFile()
|
||||
cmd = "%s -f ./tools/benchmark/basic/json/taosc_only_create_table.json" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
|
@ -86,7 +61,7 @@ class TDTestCase:
|
|||
tdSql.checkData(23, 2, 64)
|
||||
tdSql.checkData(28, 2, 64)
|
||||
|
||||
cmd = "%s -f ./taosbenchmark/json/stmt_limit_offset.json" % binPath
|
||||
cmd = "%s -f ./tools/benchmark/basic/json/stmt_limit_offset.json" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
|
|
|
@ -11,51 +11,26 @@
|
|||
|
||||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-11510] taosBenchmark test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
else:
|
||||
projPath = selfPath[: selfPath.find("tests")]
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
cmd = "%s -f ./taosbenchmark/json/stmt_sample_use_ts-subtable.json" % binPath
|
||||
binPath = etool.benchMarkFile()
|
||||
cmd = "%s -f ./tools/benchmark/basic/json/stmt_sample_use_ts-subtable.json" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
|
|
|
@ -11,51 +11,26 @@
|
|||
|
||||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-11510] taosBenchmark test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
else:
|
||||
projPath = selfPath[: selfPath.find("tests")]
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
cmd = "%s -f ./taosbenchmark/json/stmt_sample_use_ts.json" % binPath
|
||||
binPath = etool.benchMarkFile()
|
||||
cmd = "%s -f ./tools/benchmark/basic/json/stmt_sample_use_ts.json" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
|
|
|
@ -11,51 +11,26 @@
|
|||
|
||||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-11510] taosBenchmark test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
else:
|
||||
projPath = selfPath[: selfPath.find("tests")]
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
cmd = "%s -f ./taosbenchmark/json/stmt_sample_doesnt_use_ts.json" % binPath
|
||||
binPath = etool.benchMarkFile()
|
||||
cmd = "%s -f ./tools/benchmark/basic/json/stmt_sample_doesnt_use_ts.json" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
|
|
|
@ -11,51 +11,26 @@
|
|||
|
||||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-21047] taosBenchmark stream test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
else:
|
||||
projPath = selfPath[: selfPath.find("tests")]
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
cmd = "%s -f ./taosbenchmark/json/stream-test.json" % binPath
|
||||
binPath = etool.benchMarkFile()
|
||||
cmd = "%s -f ./tools/benchmark/basic/json/stream-test.json" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
|
|
|
@ -11,54 +11,29 @@
|
|||
|
||||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-21047] taosBenchmark stream test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
else:
|
||||
projPath = selfPath[: selfPath.find("tests")]
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
cmd = "%s -f ./taosbenchmark/json/stream_exist_stb_tag_prepare.json" % binPath
|
||||
binPath = etool.benchMarkFile()
|
||||
cmd = "%s -f ./tools/benchmark/basic/json/stream_exist_stb_tag_prepare.json" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
cmd = "%s -f ./taosbenchmark/json/stream_exist_stb_tag_insert_partition.json " % binPath
|
||||
cmd = "%s -f ./tools/benchmark/basic/json/stream_exist_stb_tag_insert_partition.json " % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
|
|
|
@ -11,50 +11,24 @@
|
|||
|
||||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-11510] taosBenchmark test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
else:
|
||||
projPath = selfPath[: selfPath.find("tests")]
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
cmd = "%s -f ./taosbenchmark/json/sml_rest_telnet.json" % binPath
|
||||
binPath = etool.benchMarkFile()
|
||||
cmd = "%s -f ./tools/benchmark/basic/json/sml_rest_telnet.json" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
|
@ -66,7 +40,7 @@ class TDTestCase:
|
|||
tdSql.query("select count(*) from db.stb2")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
|
||||
cmd = "%s -f ./taosbenchmark/json/sml_rest_line.json" % binPath
|
||||
cmd = "%s -f ./tools/benchmark/basic/json/sml_rest_line.json" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
|
@ -78,7 +52,7 @@ class TDTestCase:
|
|||
tdSql.query("select count(*) from db2.stb2")
|
||||
tdSql.checkData(0, 0, 160)
|
||||
|
||||
cmd = "%s -f ./taosbenchmark/json/sml_rest_json.json" % binPath
|
||||
cmd = "%s -f ./tools/benchmark/basic/json/sml_rest_json.json" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
|
|
|
@ -11,58 +11,31 @@
|
|||
|
||||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-11510] taosBenchmark test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("cannot found %s in path: %s, use system's" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin/"
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
tdSql.query("select client_version()")
|
||||
client_ver = "".join(tdSql.queryResult[0])
|
||||
major_ver = client_ver.split(".")[0]
|
||||
|
||||
binPath = self.getPath()
|
||||
cmd = "%s -f ./taosbenchmark/json/taosc_auto_create_table.json" % binPath
|
||||
binPath = etool.benchMarkFile()
|
||||
cmd = "%s -f ./tools/benchmark/basic/json/taosc_auto_create_table.json" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
|
|
|
@ -13,56 +13,31 @@
|
|||
import os
|
||||
import subprocess
|
||||
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
taosBenchmark insert mix data
|
||||
"""
|
||||
|
||||
@classmethod
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
@classmethod
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("cannot found %s in path: %s, use system's" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin/"
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
return ""
|
||||
return paths[0]
|
||||
|
||||
@classmethod
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
binPath = etool.benchMarkFile()
|
||||
# mix 1 ~ 4
|
||||
for i in range(4):
|
||||
cmd = "%s -f ./taosbenchmark/json/case-insert-mix%d.json" % (binPath, i + 1)
|
||||
cmd = "%s -f ./tools/benchmark/basic/json/case-insert-mix%d.json" % (binPath, i + 1)
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
|
||||
|
|
|
@ -13,51 +13,26 @@
|
|||
import os
|
||||
import subprocess
|
||||
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-19985] taosBenchmark retry test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("cannot found %s in path: %s, use system's" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin/"
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
return ""
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
cmd = "%s -f ./taosbenchmark/json/taosc_insert_retry-global.json" % binPath
|
||||
binPath = etool.benchMarkFile()
|
||||
cmd = "%s -f ./tools/benchmark/basic/json/taosc_insert_retry-global.json" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
time.sleep(2)
|
||||
|
|
|
@ -13,51 +13,26 @@
|
|||
import os
|
||||
import subprocess
|
||||
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-19985] taosBenchmark retry test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("cannot found %s in path: %s, use system's" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin/"
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
return ""
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
cmd = "%s -f ./taosbenchmark/json/taosc_insert_retry-stb.json" % binPath
|
||||
binPath = etool.benchMarkFile()
|
||||
cmd = "%s -f ./tools/benchmark/basic/json/taosc_insert_retry-stb.json" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
time.sleep(2)
|
||||
|
|
|
@ -13,56 +13,31 @@
|
|||
import os
|
||||
import subprocess
|
||||
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-19449] taosBenchmark creating table interval test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("cannot found %s in path: %s, use system's" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin/"
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
return ""
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
tdSql.query("select client_version()")
|
||||
client_ver = "".join(tdSql.queryResult[0])
|
||||
major_ver = client_ver.split(".")[0]
|
||||
|
||||
binPath = self.getPath()
|
||||
binPath = etool.benchMarkFile()
|
||||
cmd = (
|
||||
"%s -f ./taosbenchmark/json/taosc_insert_table-creating-interval.json -g 2>&1| grep sleep | wc -l"
|
||||
"%s -f ./tools/benchmark/basic/json/taosc_insert_table-creating-interval.json -g 2>&1| grep sleep | wc -l"
|
||||
% binPath
|
||||
)
|
||||
tdLog.info("%s" % cmd)
|
||||
|
|
|
@ -11,56 +11,25 @@
|
|||
|
||||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-23292] taosBenchmark test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("cannot found %s in path: %s, use system's" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin/"
|
||||
|
||||
tdLog.info("projPath: %s" % projPath)
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
binPath = etool.benchMarkFile()
|
||||
cmd = (
|
||||
"%s -f ./taosbenchmark/json/taosc_insert_alltypes-same-min-max.json"
|
||||
"%s -f ./tools/benchmark/basic/json/taosc_insert_alltypes-same-min-max.json"
|
||||
% binPath
|
||||
)
|
||||
tdLog.info("%s" % cmd)
|
||||
|
|
|
@ -11,56 +11,25 @@
|
|||
|
||||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-11510] taosBenchmark test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("cannot found %s in path: %s, use system's" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin/"
|
||||
|
||||
tdLog.info("projPath: %s" % projPath)
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
binPath = etool.benchMarkFile()
|
||||
cmd = (
|
||||
"%s -f ./taosbenchmark/json/taosc_insert_alltypes-partial-col.json"
|
||||
"%s -f ./tools/benchmark/basic/json/taosc_insert_alltypes-partial-col.json"
|
||||
% binPath
|
||||
)
|
||||
tdLog.info("%s" % cmd)
|
||||
|
|
|
@ -11,59 +11,28 @@
|
|||
|
||||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-11510] taosBenchmark test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("cannot found %s in path: %s, use system's" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin/"
|
||||
|
||||
tdLog.info("projPath: %s" % projPath)
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
tdSql.query("select client_version()")
|
||||
client_ver = "".join(tdSql.queryResult[0])
|
||||
major_ver = client_ver.split(".")[0]
|
||||
|
||||
binPath = self.getPath()
|
||||
cmd = "%s -f ./taosbenchmark/json/taosc_insert_alltypes.json" % binPath
|
||||
binPath = etool.benchMarkFile()
|
||||
cmd = "%s -f ./tools/benchmark/basic/json/taosc_insert_alltypes.json" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.query("select count(*) from db.stb")
|
||||
|
|
|
@ -11,51 +11,26 @@
|
|||
|
||||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-11510] taosBenchmark test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
else:
|
||||
projPath = selfPath[: selfPath.find("tests")]
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
cmd = "%s -f ./taosbenchmark/json/taosc_sample_use_ts-subtable.json" % binPath
|
||||
binPath = etool.benchMarkFile()
|
||||
cmd = "%s -f ./tools/benchmark/basic/json/taosc_sample_use_ts-subtable.json" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
|
|
|
@ -11,51 +11,26 @@
|
|||
|
||||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-11510] taosBenchmark test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
else:
|
||||
projPath = selfPath[: selfPath.find("tests")]
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
cmd = "%s -f ./taosbenchmark/json/taosc_sample_use_ts.json" % binPath
|
||||
binPath = etool.benchMarkFile()
|
||||
cmd = "%s -f ./tools/benchmark/basic/json/taosc_sample_use_ts.json" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("reset query cache")
|
||||
|
|
|
@ -12,57 +12,32 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
class TDTestCase(TBase):
|
||||
|
||||
# pylint: disable=R0201
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("cannot found %s in path: %s, use system's" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin/"
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
return ""
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
tdSql.query("select client_version()")
|
||||
client_ver = "".join(tdSql.queryResult[0])
|
||||
major_ver = client_ver.split(".")[0]
|
||||
|
||||
binPath = self.getPath()
|
||||
binPath = etool.benchMarkFile()
|
||||
if binPath == "":
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
else:
|
||||
tdLog.info("taosBenchmark use %s" % binPath)
|
||||
|
||||
# insert: sample json
|
||||
os.system("%s -f ./taosbenchmark/json/insert-sample-ts-stmt.json -y " % binPath)
|
||||
os.system("%s -f ./tools/benchmark/basic/json/insert-sample-ts-stmt.json -y " % binPath)
|
||||
tdSql.execute("use dbtest123")
|
||||
tdSql.query("select c2 from stb0")
|
||||
tdSql.checkData(0, 0, 2147483647)
|
||||
|
@ -82,7 +57,7 @@ class TDTestCase:
|
|||
tdSql.checkRows(10)
|
||||
|
||||
# insert: timestamp and step
|
||||
os.system("%s -f ./taosbenchmark/json/insert-timestep-stmt.json -y " % binPath)
|
||||
os.system("%s -f ./tools/benchmark/basic/json/insert-timestep-stmt.json -y " % binPath)
|
||||
tdSql.execute("use db")
|
||||
tdSql.query("show stables")
|
||||
if major_ver == "3":
|
||||
|
@ -106,7 +81,7 @@ class TDTestCase:
|
|||
|
||||
# # insert: disorder_ratio
|
||||
os.system(
|
||||
"%s -f ./taosbenchmark/json/insert-disorder-stmt.json 2>&1 -y " % binPath
|
||||
"%s -f ./tools/benchmark/basic/json/insert-disorder-stmt.json 2>&1 -y " % binPath
|
||||
)
|
||||
tdSql.execute("use db")
|
||||
if major_ver == "3":
|
||||
|
@ -138,7 +113,7 @@ class TDTestCase:
|
|||
|
||||
# insert: test interlace parament
|
||||
os.system(
|
||||
"%s -f ./taosbenchmark/json/insert-interlace-row-stmt.json -y " % binPath
|
||||
"%s -f ./tools/benchmark/basic/json/insert-interlace-row-stmt.json -y " % binPath
|
||||
)
|
||||
tdSql.execute("use db")
|
||||
if major_ver == "3":
|
||||
|
@ -155,7 +130,7 @@ class TDTestCase:
|
|||
tdSql.execute("create database db")
|
||||
tdSql.execute("use db")
|
||||
os.system(
|
||||
"%s -y -f ./taosbenchmark/json/insert-drop-exist-auto-N00-stmt.json "
|
||||
"%s -y -f ./tools/benchmark/basic/json/insert-drop-exist-auto-N00-stmt.json "
|
||||
% binPath
|
||||
) # drop = no, child_table_exists, auto_create_table varies
|
||||
tdSql.execute("use db")
|
||||
|
@ -186,7 +161,7 @@ class TDTestCase:
|
|||
|
||||
tdSql.execute("drop database if exists db")
|
||||
os.system(
|
||||
"%s -y -f ./taosbenchmark/json/insert-drop-exist-auto-Y00-stmt.json "
|
||||
"%s -y -f ./tools/benchmark/basic/json/insert-drop-exist-auto-Y00-stmt.json "
|
||||
% binPath
|
||||
) # drop = yes, child_table_exists, auto_create_table varies
|
||||
tdSql.execute("use db")
|
||||
|
|
|
@ -12,10 +12,13 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
import ast
|
||||
import re
|
||||
|
||||
|
@ -23,38 +26,10 @@ import re
|
|||
import subprocess
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
# pylint: disable=R0201
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
# pylint: disable=R0201
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("cannot found %s in path: %s, use system's" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin/"
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
return ""
|
||||
return paths[0]
|
||||
|
||||
# 获取taosc接口查询的结果文件中的内容,返回每行数据,并断言数据的第一列内容。
|
||||
def assertfileDataTaosc(self, filename, expectResult):
|
||||
|
@ -106,7 +81,7 @@ class TDTestCase:
|
|||
)
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
binPath = etool.benchMarkFile()
|
||||
if binPath == "":
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
else:
|
||||
|
@ -117,8 +92,8 @@ class TDTestCase:
|
|||
os.system("rm -rf ./all_query*")
|
||||
|
||||
# taosc query: query specified table and query super table
|
||||
os.system("%s -f ./taosbenchmark/json/queryInsertdata.json" % binPath)
|
||||
os.system("%s -f ./taosbenchmark/json/queryTaosc-mixed-query.json" % binPath)
|
||||
os.system("%s -f ./tools/benchmark/basic/json/queryInsertdata.json" % binPath)
|
||||
os.system("%s -f ./tools/benchmark/basic/json/queryTaosc-mixed-query.json" % binPath)
|
||||
os.system("cat query_res2.txt* > all_query_res2_taosc.txt")
|
||||
|
||||
# correct Times testcases
|
||||
|
@ -134,8 +109,8 @@ class TDTestCase:
|
|||
os.system("rm -rf ./all_query*")
|
||||
|
||||
# use restful api to query
|
||||
os.system("%s -f ./taosbenchmark/json/queryInsertrestdata.json" % binPath)
|
||||
os.system("%s -f ./taosbenchmark/json/queryRestful.json" % binPath)
|
||||
os.system("%s -f ./tools/benchmark/basic/json/queryInsertrestdata.json" % binPath)
|
||||
os.system("%s -f ./tools/benchmark/basic/json/queryRestful.json" % binPath)
|
||||
os.system("cat query_res2.txt* > all_query_res2_rest.txt")
|
||||
|
||||
# correct Times testcases
|
||||
|
@ -154,49 +129,49 @@ class TDTestCase:
|
|||
|
||||
# query times less than or equal to 100
|
||||
assert (
|
||||
os.system("%s -f ./taosbenchmark/json/queryInsertdata.json" % binPath) == 0
|
||||
os.system("%s -f ./tools/benchmark/basic/json/queryInsertdata.json" % binPath) == 0
|
||||
)
|
||||
assert (
|
||||
os.system("%s -f ./taosbenchmark/json/querySpeciMutisql100.json" % binPath)
|
||||
os.system("%s -f ./tools/benchmark/basic/json/querySpeciMutisql100.json" % binPath)
|
||||
!= 0
|
||||
)
|
||||
assert (
|
||||
os.system("%s -f ./taosbenchmark/json/querySuperMutisql100.json" % binPath)
|
||||
os.system("%s -f ./tools/benchmark/basic/json/querySuperMutisql100.json" % binPath)
|
||||
== 0
|
||||
)
|
||||
|
||||
# query result print QPS
|
||||
os.system("%s -f ./taosbenchmark/json/queryInsertdata.json" % binPath)
|
||||
exceptcode = os.system("%s -f ./taosbenchmark/json/queryQps.json" % binPath)
|
||||
os.system("%s -f ./tools/benchmark/basic/json/queryInsertdata.json" % binPath)
|
||||
exceptcode = os.system("%s -f ./tools/benchmark/basic/json/queryQps.json" % binPath)
|
||||
assert exceptcode == 0
|
||||
|
||||
# 2021.02.09 need modify taosBenchmakr code
|
||||
# use illegal or out of range parameters query json file
|
||||
os.system("%s -f ./taosbenchmark/json/queryInsertdata.json" % binPath)
|
||||
os.system("%s -f ./tools/benchmark/basic/json/queryInsertdata.json" % binPath)
|
||||
# 2021.02.09 need modify taosBenchmakr code
|
||||
# exceptcode = os.system(
|
||||
# "%s -f ./taosbenchmark/json/queryTimes0.json" %
|
||||
# "%s -f ./tools/benchmark/basic/json/queryTimes0.json" %
|
||||
# binPath)
|
||||
# assert exceptcode != 0
|
||||
|
||||
# 2021.02.09 need modify taosBenchmakr code
|
||||
# exceptcode0 = os.system(
|
||||
# "%s -f ./taosbenchmark/json/queryTimesless0.json" %
|
||||
# "%s -f ./tools/benchmark/basic/json/queryTimesless0.json" %
|
||||
# binPath)
|
||||
# assert exceptcode0 != 0
|
||||
|
||||
# exceptcode1 = os.system(
|
||||
# "%s -f ./taosbenchmark/json/queryConcurrent0.json" %
|
||||
# "%s -f ./tools/benchmark/basic/json/queryConcurrent0.json" %
|
||||
# binPath)
|
||||
# assert exceptcode2 != 0
|
||||
|
||||
# exceptcode3 = os.system(
|
||||
# "%s -f ./taosbenchmark/json/querrThreadsless0.json" %
|
||||
# "%s -f ./tools/benchmark/basic/json/querrThreadsless0.json" %
|
||||
# binPath)
|
||||
# assert exceptcode3 != 0
|
||||
|
||||
# exceptcode4 = os.system(
|
||||
# "%s -f ./taosbenchmark/json/querrThreads0.json" %
|
||||
# "%s -f ./tools/benchmark/basic/json/querrThreads0.json" %
|
||||
# binPath)
|
||||
# assert exceptcode4 != 0
|
||||
|
||||
|
|
|
@ -12,10 +12,13 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
import ast
|
||||
import re
|
||||
|
||||
|
@ -23,36 +26,8 @@ import re
|
|||
import subprocess
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
class TDTestCase(TBase):
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("cannot found %s in path: %s, use system's" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin/"
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
return ""
|
||||
return paths[0]
|
||||
|
||||
# 获取taosc接口查询的结果文件中的内容,返回每行数据,并断言数据的第一列内容。
|
||||
def assertfileDataTaosc(self, filename, expectResult):
|
||||
|
@ -104,7 +79,7 @@ class TDTestCase:
|
|||
)
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
binPath = etool.benchMarkFile()
|
||||
if binPath == "":
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
else:
|
||||
|
@ -115,8 +90,8 @@ class TDTestCase:
|
|||
os.system("rm -rf ./all_query*")
|
||||
|
||||
# taosc query: query specified table and query super table
|
||||
os.system("%s -f ./taosbenchmark/json/queryInsertdata.json" % binPath)
|
||||
os.system("%s -f ./taosbenchmark/json/queryTaosc.json" % binPath)
|
||||
os.system("%s -f ./tools/benchmark/basic/json/queryInsertdata.json" % binPath)
|
||||
os.system("%s -f ./tools/benchmark/basic/json/queryTaosc.json" % binPath)
|
||||
os.system("cat query_res0.txt* > all_query_res0_taosc.txt")
|
||||
os.system("cat query_res1.txt* > all_query_res1_taosc.txt")
|
||||
os.system("cat query_res2.txt* > all_query_res2_taosc.txt")
|
||||
|
@ -141,8 +116,8 @@ class TDTestCase:
|
|||
os.system("rm -rf ./all_query*")
|
||||
|
||||
# use restful api to query
|
||||
os.system("%s -f ./taosbenchmark/json/queryInsertrestdata.json" % binPath)
|
||||
os.system("%s -f ./taosbenchmark/json/queryRestful.json" % binPath)
|
||||
os.system("%s -f ./tools/benchmark/basic/json/queryInsertrestdata.json" % binPath)
|
||||
os.system("%s -f ./tools/benchmark/basic/json/queryRestful.json" % binPath)
|
||||
os.system("cat query_res0.txt* > all_query_res0_rest.txt")
|
||||
os.system("cat query_res1.txt* > all_query_res1_rest.txt")
|
||||
os.system("cat query_res2.txt* > all_query_res2_rest.txt")
|
||||
|
@ -176,49 +151,49 @@ class TDTestCase:
|
|||
|
||||
# query times less than or equal to 100
|
||||
assert (
|
||||
os.system("%s -f ./taosbenchmark/json/queryInsertdata.json" % binPath) == 0
|
||||
os.system("%s -f ./tools/benchmark/basic/json/queryInsertdata.json" % binPath) == 0
|
||||
)
|
||||
assert (
|
||||
os.system("%s -f ./taosbenchmark/json/querySpeciMutisql100.json" % binPath)
|
||||
os.system("%s -f ./tools/benchmark/basic/json/querySpeciMutisql100.json" % binPath)
|
||||
!= 0
|
||||
)
|
||||
assert (
|
||||
os.system("%s -f ./taosbenchmark/json/querySuperMutisql100.json" % binPath)
|
||||
os.system("%s -f ./tools/benchmark/basic/json/querySuperMutisql100.json" % binPath)
|
||||
== 0
|
||||
)
|
||||
|
||||
# query result print QPS
|
||||
os.system("%s -f ./taosbenchmark/json/queryInsertdata.json" % binPath)
|
||||
exceptcode = os.system("%s -f ./taosbenchmark/json/queryQps.json" % binPath)
|
||||
os.system("%s -f ./tools/benchmark/basic/json/queryInsertdata.json" % binPath)
|
||||
exceptcode = os.system("%s -f ./tools/benchmark/basic/json/queryQps.json" % binPath)
|
||||
assert exceptcode == 0
|
||||
|
||||
# 2021.02.09 need modify taosBenchmakr code
|
||||
# use illegal or out of range parameters query json file
|
||||
os.system("%s -f ./taosbenchmark/json/queryInsertdata.json" % binPath)
|
||||
os.system("%s -f ./tools/benchmark/basic/json/queryInsertdata.json" % binPath)
|
||||
# 2021.02.09 need modify taosBenchmakr code
|
||||
# exceptcode = os.system(
|
||||
# "%s -f ./taosbenchmark/json/queryTimes0.json" %
|
||||
# "%s -f ./tools/benchmark/basic/json/queryTimes0.json" %
|
||||
# binPath)
|
||||
# assert exceptcode != 0
|
||||
|
||||
# 2021.02.09 need modify taosBenchmakr code
|
||||
# exceptcode0 = os.system(
|
||||
# "%s -f ./taosbenchmark/json/queryTimesless0.json" %
|
||||
# "%s -f ./tools/benchmark/basic/json/queryTimesless0.json" %
|
||||
# binPath)
|
||||
# assert exceptcode0 != 0
|
||||
|
||||
# exceptcode1 = os.system(
|
||||
# "%s -f ./taosbenchmark/json/queryConcurrent0.json" %
|
||||
# "%s -f ./tools/benchmark/basic/json/queryConcurrent0.json" %
|
||||
# binPath)
|
||||
# assert exceptcode2 != 0
|
||||
|
||||
# exceptcode3 = os.system(
|
||||
# "%s -f ./taosbenchmark/json/querrThreadsless0.json" %
|
||||
# "%s -f ./tools/benchmark/basic/json/querrThreadsless0.json" %
|
||||
# binPath)
|
||||
# assert exceptcode3 != 0
|
||||
|
||||
# exceptcode4 = os.system(
|
||||
# "%s -f ./taosbenchmark/json/querrThreads0.json" %
|
||||
# "%s -f ./tools/benchmark/basic/json/querrThreads0.json" %
|
||||
# binPath)
|
||||
# assert exceptcode4 != 0
|
||||
|
||||
|
|
|
@ -12,58 +12,31 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
import time
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-11510] taosBenchmark test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("cannot found %s in path: %s, use system's" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin/"
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
tdSql.query("select client_version()")
|
||||
client_ver = "".join(tdSql.queryResult[0])
|
||||
major_ver = client_ver.split(".")[0]
|
||||
|
||||
binPath = self.getPath()
|
||||
cmd = "%s -f ./taosbenchmark/json/sml_telnet_tcp.json" % binPath
|
||||
binPath = etool.benchMarkFile()
|
||||
cmd = "%s -f ./tools/benchmark/basic/json/sml_telnet_tcp.json" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
time.sleep(5)
|
||||
|
|
|
@ -12,67 +12,42 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
import time
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-11510] taosBenchmark test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
else:
|
||||
projPath = selfPath[: selfPath.find("tests")]
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
tdSql.execute("drop topic if exists tmq_topic_0")
|
||||
tdSql.execute("drop topic if exists tmq_topic_1")
|
||||
binPath = self.getPath()
|
||||
cmd = "%s -f ./taosbenchmark/json/default.json" % binPath
|
||||
binPath = etool.benchMarkFile()
|
||||
cmd = "%s -f ./tools/benchmark/basic/json/default.json" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
tdSql.execute("alter database db WAL_RETENTION_PERIOD 3600000")
|
||||
tdSql.execute("reset query cache")
|
||||
cmd = "%s -f ./taosbenchmark/json/tmq_basic.json " % binPath
|
||||
cmd = "%s -f ./tools/benchmark/basic/json/tmq_basic.json " % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
time.sleep(5)
|
||||
|
||||
cmd = "%s -f ./taosbenchmark/json/tmq_basic2.json " % binPath
|
||||
cmd = "%s -f ./tools/benchmark/basic/json/tmq_basic2.json " % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
time.sleep(5)
|
||||
cmd = "%s -f ./taosbenchmark/json/tmq_basic3.json " % binPath
|
||||
cmd = "%s -f ./tools/benchmark/basic/json/tmq_basic3.json " % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
time.sleep(5)
|
||||
|
|
|
@ -12,53 +12,23 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
import subprocess
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-22022] taosBenchmark cloud test cases
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("Cannot find %s in path: %s" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin/"
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
tdLog.info(f"{tool} not found in {projPath}!")
|
||||
return f"/usr/local/taos/bin/{tool}"
|
||||
else:
|
||||
tdLog.info(f"{tool} is found in {paths[0]}!")
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
binPath = etool.benchMarkFile()
|
||||
cmd = "%s -T 1 -t 2 -n 10 -y" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
|
|
|
@ -10,50 +10,25 @@
|
|||
###################################################################
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
class TDTestCase(TBase):
|
||||
def caseDescription(self):
|
||||
"""
|
||||
[TD-17079] taosBenchmark test cloud
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
|
||||
def getPath(self, tool="taosBenchmark"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
else:
|
||||
projPath = selfPath[: selfPath.find("tests")]
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
tdLog.exit("taosBenchmark not found!")
|
||||
return
|
||||
else:
|
||||
tdLog.info("taosBenchmark found in %s" % paths[0])
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
binPath = etool.benchMarkFile()
|
||||
cmd = "%s -t 1 -n 1 -y -W http://localhost:6041 -D 30" % binPath
|
||||
tdLog.info("%s" % cmd)
|
||||
os.system("%s" % cmd)
|
||||
|
|
|
@ -12,10 +12,13 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
|
@ -24,36 +27,7 @@ class TDTestCase:
|
|||
case1<sdsang>: [TD-18291] taosdump basic test
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
self.tmpdir = "tmp"
|
||||
|
||||
def getPath(self, tool="taosdump"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("Cannot find %s in path: %s" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin/"
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
return ""
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
tdSql.prepare()
|
||||
|
@ -89,7 +63,7 @@ class TDTestCase:
|
|||
|
||||
# sys.exit(1)
|
||||
|
||||
binPath = self.getPath()
|
||||
binPath = etool.taosDumpFile()
|
||||
if binPath == "":
|
||||
tdLog.exit("taosdump not found!")
|
||||
else:
|
||||
|
|
|
@ -12,10 +12,13 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
|
@ -24,36 +27,8 @@ class TDTestCase:
|
|||
case1<sdsang>: [TD-18291] taosdump basic test
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
self.tmpdir = "tmp"
|
||||
|
||||
def getPath(self, tool="taosdump"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("cannot found %s in path: %s, use system's" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin/"
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
return ""
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
tdSql.prepare()
|
||||
|
@ -89,7 +64,7 @@ class TDTestCase:
|
|||
|
||||
# sys.exit(1)
|
||||
|
||||
binPath = self.getPath()
|
||||
binPath = etool.taosDumpFile()
|
||||
if binPath == "":
|
||||
tdLog.exit("taosdump not found!")
|
||||
else:
|
||||
|
|
|
@ -12,10 +12,13 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
|
@ -24,36 +27,8 @@ class TDTestCase:
|
|||
case1<sdsang>: [TD-20506] taosdump dump db with non-root
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
self.tmpdir = "tmp"
|
||||
|
||||
def getPath(self, tool="taosdump"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("cannot found %s in path: %s, use system's" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin/"
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
return ""
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
tdSql.prepare()
|
||||
|
@ -89,7 +64,7 @@ class TDTestCase:
|
|||
|
||||
# sys.exit(1)
|
||||
|
||||
binPath = self.getPath()
|
||||
binPath = etool.taosDumpFile()
|
||||
if binPath == "":
|
||||
tdLog.exit("taosdump not found!")
|
||||
else:
|
||||
|
|
|
@ -12,10 +12,13 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
|
@ -24,36 +27,8 @@ class TDTestCase:
|
|||
case1<sdsang>: [TS-3072] taosdump dump escaped db name test
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
self.tmpdir = "tmp"
|
||||
|
||||
def getPath(self, tool="taosdump"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("cannot found %s in path: %s, use system's" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin/"
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
return ""
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
tdSql.prepare()
|
||||
|
@ -73,7 +48,7 @@ class TDTestCase:
|
|||
)
|
||||
# sys.exit(1)
|
||||
|
||||
binPath = self.getPath()
|
||||
binPath = etool.taosDumpFile()
|
||||
if binPath == "":
|
||||
tdLog.exit("taosdump not found!")
|
||||
else:
|
||||
|
|
|
@ -12,10 +12,13 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
|
@ -24,39 +27,11 @@ class TDTestCase:
|
|||
case1<sdsang>: [TS-3102] taosdump in diff type test
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
self.tmpdir = "tmp"
|
||||
|
||||
def getPath(self, tool="taosdump"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("cannot found %s in path: %s, use system's" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin/"
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
return ""
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
binPath = etool.taosDumpFile()
|
||||
if binPath == "":
|
||||
tdLog.exit("taosdump not found!")
|
||||
else:
|
||||
|
|
|
@ -12,10 +12,13 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
|
@ -24,36 +27,8 @@ class TDTestCase:
|
|||
case1<sdsang>: [TS-1762] taosdump with many columns
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
self.tmpdir = "tmp"
|
||||
|
||||
def getPath(self, tool="taosdump"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("cannot found %s in path: %s, use system's" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin/"
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
return ""
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
tdSql.prepare()
|
||||
|
@ -93,7 +68,7 @@ class TDTestCase:
|
|||
ins_sql += ")"
|
||||
tdSql.execute(ins_sql)
|
||||
|
||||
binPath = self.getPath()
|
||||
binPath = etool.taosDumpFile()
|
||||
if binPath == "":
|
||||
tdLog.exit("taosdump not found!")
|
||||
else:
|
||||
|
|
|
@ -12,10 +12,13 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
|
@ -24,39 +27,11 @@ class TDTestCase:
|
|||
case1<sdsang>: [TS-2769] taosdump start-time end-time test
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
self.tmpdir = "tmp"
|
||||
|
||||
def getPath(self, tool="taosdump"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("cannot found %s in path: %s, use system's" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin/"
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
return ""
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
binPath = etool.taosDumpFile()
|
||||
if binPath == "":
|
||||
tdLog.exit("taosdump not found!")
|
||||
else:
|
||||
|
|
|
@ -12,10 +12,13 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
|
@ -24,39 +27,11 @@ class TDTestCase:
|
|||
case1<sdsang>: [TS-2769] taosdump start-time end-time test
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
self.tmpdir = "tmp"
|
||||
|
||||
def getPath(self, tool="taosdump"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("cannot found %s in path: %s, use system's" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin/"
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
return ""
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
binPath = self.getPath()
|
||||
binPath = etool.taosDumpFile()
|
||||
if binPath == "":
|
||||
tdLog.exit("taosdump not found!")
|
||||
else:
|
||||
|
|
|
@ -12,10 +12,13 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
|
@ -34,31 +37,6 @@ class TDTestCase:
|
|||
else:
|
||||
return True
|
||||
|
||||
def getPath(self, tool="taosdump"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("cannot found %s in path: %s, use system's" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin/"
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
return ""
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
if not os.path.exists("./taosdumptest/tmp1"):
|
||||
|
@ -93,7 +71,7 @@ class TDTestCase:
|
|||
sql += "(%d, %d, 'nchar%d')" % (currts + i, i % 100, i % 100)
|
||||
tdSql.execute(sql)
|
||||
|
||||
binPath = self.getPath("taosdump")
|
||||
binPath = self.etool.taosDumpFile()
|
||||
if binPath == "":
|
||||
tdLog.exit("taosdump not found!")
|
||||
else:
|
||||
|
|
|
@ -13,10 +13,13 @@
|
|||
|
||||
from logging.config import dictConfig
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
import string
|
||||
import random
|
||||
|
||||
|
@ -30,31 +33,6 @@ class TDTestCase:
|
|||
self.numberOfTables = 1
|
||||
self.numberOfRecords = 150
|
||||
|
||||
def getPath(self, tool="taosdump"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("cannot found %s in path: %s, use system's" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin/"
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
return ""
|
||||
return paths[0]
|
||||
|
||||
def generateString(self, length):
|
||||
chars = string.ascii_uppercase + string.ascii_lowercase
|
||||
|
@ -90,7 +68,7 @@ class TDTestCase:
|
|||
break
|
||||
tdSql.execute(sql)
|
||||
|
||||
binPath = self.getPath("taosdump")
|
||||
binPath = self.etool.taosDumpFile()
|
||||
if binPath == "":
|
||||
tdLog.exit("taosdump not found!")
|
||||
else:
|
||||
|
|
|
@ -12,10 +12,13 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
|
@ -24,36 +27,8 @@ class TDTestCase:
|
|||
case1<sdsang>: [TD-18291] taosdump basic test
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
self.tmpdir = "tmp"
|
||||
|
||||
def getPath(self, tool="taosdump"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("cannot found %s in path: %s, use system's" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin/"
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
return ""
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
tdSql.prepare()
|
||||
|
@ -89,7 +64,7 @@ class TDTestCase:
|
|||
|
||||
# sys.exit(1)
|
||||
|
||||
binPath = self.getPath()
|
||||
binPath = etool.taosDumpFile()
|
||||
if binPath == "":
|
||||
tdLog.exit("taosdump not found!")
|
||||
else:
|
||||
|
|
|
@ -12,10 +12,13 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
|
@ -24,37 +27,6 @@ class TDTestCase:
|
|||
case1<sdsang>: [TD-14544] taosdump data inspect
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
self.tmpdir = "tmp"
|
||||
|
||||
def getPath(self, tool="taosdump"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("cannot found %s in path: %s, use system's" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin"
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
return ""
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
tdSql.prepare()
|
||||
|
||||
|
@ -80,7 +52,7 @@ class TDTestCase:
|
|||
|
||||
# sys.exit(1)
|
||||
|
||||
binPath = self.getPath()
|
||||
binPath = etool.taosDumpFile()
|
||||
if binPath == "":
|
||||
tdLog.exit("taosdump not found!")
|
||||
else:
|
||||
|
|
|
@ -12,10 +12,13 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
|
@ -24,36 +27,8 @@ class TDTestCase:
|
|||
case1<sdsang>: [TD-19436] taosdump loose mode test
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
self.tmpdir = "tmp"
|
||||
|
||||
def getPath(self, tool="taosdump"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("cannot found %s in path: %s, use system's" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin/"
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
return ""
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
tdSql.prepare()
|
||||
|
@ -79,7 +54,7 @@ class TDTestCase:
|
|||
|
||||
# sys.exit(1)
|
||||
|
||||
binPath = self.getPath()
|
||||
binPath = etool.taosDumpFile()
|
||||
if binPath == "":
|
||||
tdLog.exit("taosdump not found!")
|
||||
else:
|
||||
|
|
|
@ -12,10 +12,13 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
|
@ -34,31 +37,6 @@ class TDTestCase:
|
|||
else:
|
||||
return True
|
||||
|
||||
def getPath(self, tool="taosdump"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("cannot found %s in path: %s, use system's" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin/"
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
return ""
|
||||
return paths[0]
|
||||
|
||||
def createdb(self, precision="ns"):
|
||||
tb_nums = self.numberOfTables
|
||||
|
@ -132,7 +110,7 @@ class TDTestCase:
|
|||
if not os.path.exists("./taosdumptest/dumptmp3"):
|
||||
os.makedirs("./taosdumptest/dumptmp3")
|
||||
|
||||
binPath = self.getPath("taosdump")
|
||||
binPath = self.etool.taosDumpFile()
|
||||
if binPath == "":
|
||||
tdLog.exit("taosdump not found!")
|
||||
else:
|
||||
|
|
|
@ -12,10 +12,13 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
|
@ -24,36 +27,8 @@ class TDTestCase:
|
|||
case1<sdsang>: [TD-12526] taosdump supports big int
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
self.tmpdir = "tmp"
|
||||
|
||||
def getPath(self, tool="taosdump"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("cannot found %s in path: %s, use system's" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin/"
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
return ""
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
tdSql.prepare()
|
||||
|
@ -77,7 +52,7 @@ class TDTestCase:
|
|||
|
||||
# sys.exit(1)
|
||||
|
||||
binPath = self.getPath()
|
||||
binPath = etool.taosDumpFile()
|
||||
if binPath == "":
|
||||
tdLog.exit("taosdump not found!")
|
||||
else:
|
||||
|
|
|
@ -12,10 +12,13 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
|
@ -24,36 +27,8 @@ class TDTestCase:
|
|||
case1<sdsang>: [TD-12526] taosdump supports binary
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
self.tmpdir = "tmp"
|
||||
|
||||
def getPath(self, tool="taosdump"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("cannot found %s in path: %s, use system's" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin/"
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
return ""
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
tdSql.prepare()
|
||||
|
@ -71,7 +46,7 @@ class TDTestCase:
|
|||
tdSql.execute("create table t2 using st tags(NULL)")
|
||||
tdSql.execute("insert into t2 values(1640000000000, NULL, NULL)")
|
||||
|
||||
binPath = self.getPath()
|
||||
binPath = etool.taosDumpFile()
|
||||
if binPath == "":
|
||||
tdLog.exit("taosdump not found!")
|
||||
else:
|
||||
|
|
|
@ -12,10 +12,13 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
import os
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
|
@ -24,36 +27,8 @@ class TDTestCase:
|
|||
case1<sdsang>: [TD-12526] taosdump supports bool
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
self.tmpdir = "tmp"
|
||||
|
||||
def getPath(self, tool="taosdump"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("cannot found %s in path: %s, use system's" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin/"
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
return ""
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
tdSql.prepare()
|
||||
|
@ -70,7 +45,7 @@ class TDTestCase:
|
|||
tdSql.execute("create table t3 using st tags(NULL)")
|
||||
tdSql.execute("insert into t3 values(1640000000000, NULL)")
|
||||
|
||||
binPath = self.getPath()
|
||||
binPath = etool.taosDumpFile()
|
||||
if binPath == "":
|
||||
tdLog.exit("taosdump not found!")
|
||||
else:
|
||||
|
|
|
@ -13,10 +13,13 @@
|
|||
|
||||
import os
|
||||
import math
|
||||
from util.log import *
|
||||
from util.cases import *
|
||||
from util.sql import *
|
||||
from util.dnodes import *
|
||||
import frame
|
||||
import frame.etool
|
||||
from frame.log import *
|
||||
from frame.cases import *
|
||||
from frame.sql import *
|
||||
from frame.caseBase import *
|
||||
from frame import *
|
||||
|
||||
|
||||
class TDTestCase:
|
||||
|
@ -25,36 +28,8 @@ class TDTestCase:
|
|||
case1<sdsang>: [TD-12526] taosdump supports double
|
||||
"""
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
tdSql.init(conn.cursor(), logSql)
|
||||
self.tmpdir = "tmp"
|
||||
|
||||
def getPath(self, tool="taosdump"):
|
||||
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
if "community" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("community")]
|
||||
elif "src" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("src")]
|
||||
elif "/tools/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tools/")]
|
||||
elif "/tests/" in selfPath:
|
||||
projPath = selfPath[: selfPath.find("/tests/")]
|
||||
else:
|
||||
tdLog.info("cannot found %s in path: %s, use system's" % (tool, selfPath))
|
||||
projPath = "/usr/local/taos/bin/"
|
||||
|
||||
paths = []
|
||||
for root, dummy, files in os.walk(projPath):
|
||||
if (tool) in files:
|
||||
rootRealPath = os.path.dirname(os.path.realpath(root))
|
||||
if "packaging" not in rootRealPath:
|
||||
paths.append(os.path.join(root, tool))
|
||||
break
|
||||
if len(paths) == 0:
|
||||
return ""
|
||||
return paths[0]
|
||||
|
||||
def run(self):
|
||||
tdSql.prepare()
|
||||
|
@ -78,7 +53,7 @@ class TDTestCase:
|
|||
|
||||
# sys.exit(1)
|
||||
|
||||
binPath = self.getPath()
|
||||
binPath = etool.taosDumpFile()
|
||||
if binPath == "":
|
||||
tdLog.exit("taosdump not found!")
|
||||
else:
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue