From 062faacc38ae49aa2e731706ac7ff1c7ad055189 Mon Sep 17 00:00:00 2001 From: haoranchen Date: Thu, 20 Oct 2022 18:01:58 +0800 Subject: [PATCH] Update compatibility.py --- tests/system-test/0-others/compatibility.py | 30 ++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/tests/system-test/0-others/compatibility.py b/tests/system-test/0-others/compatibility.py index 988dc9414c..4fa75b75f1 100644 --- a/tests/system-test/0-others/compatibility.py +++ b/tests/system-test/0-others/compatibility.py @@ -84,21 +84,21 @@ class TDTestCase: tableNumbers=100 recordNumbers1=100 recordNumbers2=1000 -# tdsqlF=tdCom.newTdSql() -# print(tdsqlF) -# 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}") - -# tdLog.printNoPrefix(f"==========step1:prepare and check data in old version-{oldServerVersion}") -# tdLog.info(f"taosBenchmark -t {tableNumbers} -n {recordNumbers1} -y ") -# os.system(f"taosBenchmark -t {tableNumbers} -n {recordNumbers1} -y ") -# sleep(3) + tdsqlF=tdCom.newTdSql() + print(tdsqlF) + 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}") + + tdLog.printNoPrefix(f"==========step1:prepare and check data in old version-{oldServerVersion}") + tdLog.info(f"taosBenchmark -t {tableNumbers} -n {recordNumbers1} -y ") + os.system(f"taosBenchmark -t {tableNumbers} -n {recordNumbers1} -y ") + sleep(3) # # tdsqlF.query(f"select count(*) from {stb}") # # tdsqlF.checkData(0,0,tableNumbers*recordNumbers1) -- GitLab