test:modify base version from 3.0.1.0 to 3.0.1.8 in compatibility testcase
This commit is contained in:
parent
f76441bafb
commit
78b0844aec
|
@ -3,8 +3,7 @@ import taos
|
|||
import sys
|
||||
import os
|
||||
import time
|
||||
|
||||
|
||||
from pathlib import Path
|
||||
from util.log import *
|
||||
from util.sql import *
|
||||
from util.cases import *
|
||||
|
@ -62,8 +61,16 @@ 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/"
|
||||
packageName="TDengine-server-3.0.1.0-Linux-x64.tar.gz"
|
||||
os.system(f"cd {packagePath} && tar xvf TDengine-server-3.0.1.0-Linux-x64.tar.gz && cd TDengine-server-3.0.1.0 && ./install.sh -e no " )
|
||||
baseVersion = "3.0.1.8"
|
||||
packageName = "TDengine-server-{baseVersion}-Linux-x64.tar.gz"
|
||||
packageTPath = packageName.split("-Linux-")[0]
|
||||
my_file = Path(f"{packagePath}/{packageName}")
|
||||
if not my_file.exists():
|
||||
print(f"{packageName} is not exists")
|
||||
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 " )
|
||||
tdDnodes.stop(1)
|
||||
print(f"start taosd: nohup taosd -c {cPath} & ")
|
||||
os.system(f" nohup taosd -c {cPath} & " )
|
||||
|
@ -77,7 +84,6 @@ class TDTestCase:
|
|||
|
||||
|
||||
def run(self):
|
||||
print(f"start taosd run")
|
||||
bPath=self.getBuildPath()
|
||||
cPath=self.getCfgPath()
|
||||
dbname = "test"
|
||||
|
@ -89,19 +95,16 @@ class TDTestCase:
|
|||
recordNumbers2=1000
|
||||
# tdsqlF=tdCom.newTdSql()
|
||||
# print(tdsqlF)
|
||||
|
||||
oldServerVersion = '3.0.1.0'
|
||||
# tdsqlF.query(f"SELECT SERVER_VERSION();")
|
||||
# print(tdsqlF.query(f"SELECT SERVER_VERSION();"))
|
||||
# oldServerVersion=tdsqlF.queryResult[0][0]
|
||||
# tdLog.info(f"Base server version is {oldServerVersion}")
|
||||
# tdsqlF.query(f"SELECT CLIENT_VERSION();")
|
||||
#
|
||||
|
||||
# # the oldClientVersion can't be updated in the same python process,so the version is new compiled verison
|
||||
# oldClientVersion=tdsqlF.queryResult[0][0]
|
||||
|
||||
# tdLog.info(f"Base client version is {oldClientVersion}")
|
||||
|
||||
oldServerVersion = "3.0.1.0"
|
||||
tdLog.printNoPrefix(f"==========step1:prepare and check data in old version-{oldServerVersion}")
|
||||
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 ")
|
||||
|
@ -142,6 +145,8 @@ class TDTestCase:
|
|||
os.system(f"taosBenchmark -t {tableNumbers} -n {recordNumbers2} -y ")
|
||||
tdsql.query(f"select count(*) from {stb}")
|
||||
tdsql.checkData(0,0,tableNumbers*recordNumbers2)
|
||||
tdsql.query(f"select count(*) from db4096.stb0")
|
||||
tdsql.checkData(0,0,50000)
|
||||
|
||||
tdsql=tdCom.newTdSql()
|
||||
tdLog.printNoPrefix(f"==========step4:verify backticks in taos Sql-TD18542")
|
||||
|
|
Loading…
Reference in New Issue