test:modify testcase that deletes dataDir when starting old taosd
This commit is contained in:
parent
9f9e2081f1
commit
f97b46877d
|
@ -62,7 +62,7 @@ class TDTestCase:
|
|||
# os.system(f"mv {self.getBuildPath()}/build/lib/libtaos.so.1 {self.getBuildPath()}/build/lib/libtaos.so.1_bak ")
|
||||
|
||||
packagePath = "/usr/local/src/"
|
||||
|
||||
dataPath = cPath + "/../data/"
|
||||
packageName = "TDengine-server-"+ BASEVERSION + "-Linux-x64.tar.gz"
|
||||
packageTPath = packageName.split("-Linux-")[0]
|
||||
my_file = Path(f"{packagePath}/{packageName}")
|
||||
|
@ -71,10 +71,10 @@ class TDTestCase:
|
|||
os.system(f"cd {packagePath} && wget https://www.tdengine.com/assets-download/3.0/{packageName}")
|
||||
else:
|
||||
print(f"{packageName} has been exists")
|
||||
os.system(f"cd {packagePath} && tar xvf {packageName} && cd {packageTPath} && ./install.sh -e no " )
|
||||
os.system(f" cd {packagePath} && tar xvf {packageName} && cd {packageTPath} && ./install.sh -e no " )
|
||||
tdDnodes.stop(1)
|
||||
print(f"start taosd: nohup taosd -c {cPath} & ")
|
||||
os.system(f" nohup taosd -c {cPath} & " )
|
||||
print(f"start taosd: rm -rf {dataPath}/* && nohup taosd -c {cPath} & ")
|
||||
os.system(f"rm -rf {dataPath}/* && nohup taosd -c {cPath} & " )
|
||||
sleep(5)
|
||||
|
||||
|
||||
|
@ -85,8 +85,8 @@ class TDTestCase:
|
|||
|
||||
|
||||
def run(self):
|
||||
bPath=self.getBuildPath()
|
||||
cPath=self.getCfgPath()
|
||||
bPath = self.getBuildPath()
|
||||
cPath = self.getCfgPath()
|
||||
dbname = "test"
|
||||
stb = f"{dbname}.meters"
|
||||
self.installTaosd(bPath,cPath)
|
||||
|
@ -94,6 +94,7 @@ class TDTestCase:
|
|||
tableNumbers=100
|
||||
recordNumbers1=100
|
||||
recordNumbers2=1000
|
||||
|
||||
# tdsqlF=tdCom.newTdSql()
|
||||
# print(tdsqlF)
|
||||
# tdsqlF.query(f"SELECT SERVER_VERSION();")
|
||||
|
@ -105,6 +106,7 @@ class TDTestCase:
|
|||
# oldClientVersion=tdsqlF.queryResult[0][0]
|
||||
# tdLog.info(f"Base client version is {oldClientVersion}")
|
||||
# baseVersion = "3.0.1.8"
|
||||
|
||||
tdLog.printNoPrefix(f"==========step1:prepare and check data in old version-{BASEVERSION}")
|
||||
tdLog.info(f" LD_LIBRARY_PATH=/usr/lib taosBenchmark -t {tableNumbers} -n {recordNumbers1} -y ")
|
||||
os.system(f"LD_LIBRARY_PATH=/usr/lib taosBenchmark -t {tableNumbers} -n {recordNumbers1} -y ")
|
||||
|
|
Loading…
Reference in New Issue