From c1bb99fec94ecafe697acbd9ba46d5d236793ac6 Mon Sep 17 00:00:00 2001 From: haoranchen Date: Fri, 21 Oct 2022 15:17:56 +0800 Subject: [PATCH] Update compatibility.py --- tests/system-test/0-others/compatibility.py | 98 ++++++++++----------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/tests/system-test/0-others/compatibility.py b/tests/system-test/0-others/compatibility.py index 04cbcb4e54..e81579a9e4 100644 --- a/tests/system-test/0-others/compatibility.py +++ b/tests/system-test/0-others/compatibility.py @@ -101,55 +101,55 @@ class TDTestCase: os.system(f"LD_LIBRARY_PATH=/usr/lib taosBenchmark -t {tableNumbers} -n {recordNumbers1} -y ") sleep(3) -# # tdsqlF.query(f"select count(*) from {stb}") -# # tdsqlF.checkData(0,0,tableNumbers*recordNumbers1) -# os.system("pkill taosd") -# sleep(1) - -# tdLog.printNoPrefix("==========step2:update new version ") -# self.buildTaosd(bPath) -# tdDnodes.start(1) -# sleep(1) -# tdsql=tdCom.newTdSql() -# print(tdsql) - - -# tdsql.query(f"SELECT SERVER_VERSION();") -# nowServerVersion=tdsql.queryResult[0][0] -# tdLog.info(f"New server version is {nowServerVersion}") -# tdsql.query(f"SELECT CLIENT_VERSION();") -# nowClientVersion=tdsql.queryResult[0][0] -# tdLog.info(f"New client version is {nowClientVersion}") - -# tdLog.printNoPrefix(f"==========step3:prepare and check data in new version-{nowServerVersion}") -# tdsql.query(f"select count(*) from {stb}") -# tdsql.checkData(0,0,tableNumbers*recordNumbers1) -# os.system(f"taosBenchmark -t {tableNumbers} -n {recordNumbers2} -y ") -# tdsql.query(f"select count(*) from {stb}") -# tdsql.checkData(0,0,tableNumbers*recordNumbers2) - -# tdsql=tdCom.newTdSql() -# tdLog.printNoPrefix(f"==========step4:verify backticks in taos Sql-TD18542") -# tdsql.execute("drop database if exists db") -# tdsql.execute("create database db") -# tdsql.execute("use db") -# tdsql.execute("create stable db.stb1 (ts timestamp, c1 int) tags (t1 int);") -# tdsql.execute("insert into db.ct1 using db.stb1 TAGS(1) values(now(),11);") -# tdsql.error(" insert into `db.ct2` using db.stb1 TAGS(9) values(now(),11);") -# tdsql.error(" insert into db.`db.ct2` using db.stb1 TAGS(9) values(now(),11);") -# tdsql.execute("insert into `db`.ct3 using db.stb1 TAGS(3) values(now(),13);") -# tdsql.query("select * from db.ct3") -# tdsql.checkData(0,1,13) -# tdsql.execute("insert into db.`ct4` using db.stb1 TAGS(4) values(now(),14);") -# tdsql.query("select * from db.ct4") -# tdsql.checkData(0,1,14) -# tdsql.query("describe information_schema.ins_databases;") -# qRows=tdsql.queryRows -# for i in range(qRows) : -# if tdsql.queryResult[i][0]=="retentions" : -# return True -# else: -# return False + # tdsqlF.query(f"select count(*) from {stb}") + # tdsqlF.checkData(0,0,tableNumbers*recordNumbers1) + os.system("pkill taosd") + sleep(1) + + tdLog.printNoPrefix("==========step2:update new version ") + self.buildTaosd(bPath) + tdDnodes.start(1) + sleep(1) + tdsql=tdCom.newTdSql() + print(tdsql) + + + tdsql.query(f"SELECT SERVER_VERSION();") + nowServerVersion=tdsql.queryResult[0][0] + tdLog.info(f"New server version is {nowServerVersion}") + tdsql.query(f"SELECT CLIENT_VERSION();") + nowClientVersion=tdsql.queryResult[0][0] + tdLog.info(f"New client version is {nowClientVersion}") + + tdLog.printNoPrefix(f"==========step3:prepare and check data in new version-{nowServerVersion}") + tdsql.query(f"select count(*) from {stb}") + tdsql.checkData(0,0,tableNumbers*recordNumbers1) + os.system(f"taosBenchmark -t {tableNumbers} -n {recordNumbers2} -y ") + tdsql.query(f"select count(*) from {stb}") + tdsql.checkData(0,0,tableNumbers*recordNumbers2) + + tdsql=tdCom.newTdSql() + tdLog.printNoPrefix(f"==========step4:verify backticks in taos Sql-TD18542") + tdsql.execute("drop database if exists db") + tdsql.execute("create database db") + tdsql.execute("use db") + tdsql.execute("create stable db.stb1 (ts timestamp, c1 int) tags (t1 int);") + tdsql.execute("insert into db.ct1 using db.stb1 TAGS(1) values(now(),11);") + tdsql.error(" insert into `db.ct2` using db.stb1 TAGS(9) values(now(),11);") + tdsql.error(" insert into db.`db.ct2` using db.stb1 TAGS(9) values(now(),11);") + tdsql.execute("insert into `db`.ct3 using db.stb1 TAGS(3) values(now(),13);") + tdsql.query("select * from db.ct3") + tdsql.checkData(0,1,13) + tdsql.execute("insert into db.`ct4` using db.stb1 TAGS(4) values(now(),14);") + tdsql.query("select * from db.ct4") + tdsql.checkData(0,1,14) + tdsql.query("describe information_schema.ins_databases;") + qRows=tdsql.queryRows + for i in range(qRows) : + if tdsql.queryResult[i][0]=="retentions" : + return True + else: + return False def stop(self): tdSql.close() tdLog.success(f"{__file__} successfully executed") -- GitLab