Merge pull request #7528 from taosdata/zhaoyang
refactor python test script
This commit is contained in:
commit
c294053e92
|
@ -20,9 +20,9 @@ from util.log import *
|
||||||
|
|
||||||
|
|
||||||
class TDSimClient:
|
class TDSimClient:
|
||||||
def __init__(self):
|
def __init__(self, path):
|
||||||
self.testCluster = False
|
self.testCluster = False
|
||||||
|
self.path = path
|
||||||
self.cfgDict = {
|
self.cfgDict = {
|
||||||
"numOfLogLines": "100000000",
|
"numOfLogLines": "100000000",
|
||||||
"numOfThreadsPerCore": "2.0",
|
"numOfThreadsPerCore": "2.0",
|
||||||
|
@ -41,10 +41,7 @@ class TDSimClient:
|
||||||
"jnidebugFlag": "135",
|
"jnidebugFlag": "135",
|
||||||
"qdebugFlag": "135",
|
"qdebugFlag": "135",
|
||||||
"telemetryReporting": "0",
|
"telemetryReporting": "0",
|
||||||
}
|
}
|
||||||
def init(self, path):
|
|
||||||
self.__init__()
|
|
||||||
self.path = path
|
|
||||||
|
|
||||||
def getLogDir(self):
|
def getLogDir(self):
|
||||||
self.logDir = "%s/sim/psim/log" % (self.path)
|
self.logDir = "%s/sim/psim/log" % (self.path)
|
||||||
|
@ -480,8 +477,7 @@ class TDDnodes:
|
||||||
for i in range(len(self.dnodes)):
|
for i in range(len(self.dnodes)):
|
||||||
self.dnodes[i].init(self.path)
|
self.dnodes[i].init(self.path)
|
||||||
|
|
||||||
self.sim = TDSimClient()
|
self.sim = TDSimClient(self.path)
|
||||||
self.sim.init(self.path)
|
|
||||||
|
|
||||||
def setTestCluster(self, value):
|
def setTestCluster(self, value):
|
||||||
self.testCluster = value
|
self.testCluster = value
|
||||||
|
|
Loading…
Reference in New Issue