From 5c7997be4b17a21cb30f887a7c6f33bd88cf31f6 Mon Sep 17 00:00:00 2001 From: tomchon Date: Tue, 20 Sep 2022 18:17:23 +0800 Subject: [PATCH] test:verify backticks with atuo creating tables --- tests/system-test/0-others/compatibility.py | 32 ++++++++++++--------- tests/system-test/fulltest.sh | 1 + 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/tests/system-test/0-others/compatibility.py b/tests/system-test/0-others/compatibility.py index 8636274ca3..4dae6f06cf 100644 --- a/tests/system-test/0-others/compatibility.py +++ b/tests/system-test/0-others/compatibility.py @@ -76,7 +76,6 @@ class TDTestCase: def run(self): - print(f"buildpath:{self.getBuildPath()}") bPath=self.getBuildPath() cPath=self.getCfgPath() dbname = "test" @@ -85,7 +84,6 @@ class TDTestCase: tableNumbers=100 recordNumbers1=100 recordNumbers2=1000 - # print(tdSql) tdsqlF=tdCom.newTdSql() print(tdsqlF) tdsqlF.query(f"SELECT SERVER_VERSION();") @@ -111,24 +109,32 @@ class TDTestCase: self.buildTaosd(bPath) tdDnodes.start(1) sleep(1) - tdsql_new=tdCom.newTdSql() - print(tdsql_new) + tdsql=tdCom.newTdSql() + print(tdsql) - tdsql_new.query(f"SELECT SERVER_VERSION();") - nowServerVersion=tdsql_new.queryResult[0][0] + tdsql.query(f"SELECT SERVER_VERSION();") + nowServerVersion=tdsql.queryResult[0][0] tdLog.info(f"New server version is {nowServerVersion}") - tdsql_new.query(f"SELECT CLIENT_VERSION();") - nowClientVersion=tdsql_new.queryResult[0][0] + 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_new.query(f"select count(*) from {stb}") - tdsql_new.checkData(0,0,tableNumbers*recordNumbers1) + tdsql.query(f"select count(*) from {stb}") + tdsql.checkData(0,0,tableNumbers*recordNumbers1) os.system(f"taosBenchmark -t {tableNumbers} -n {recordNumbers2} -y ") - tdsql_new.query(f"select count(*) from {stb}") - tdsql_new.checkData(0,0,tableNumbers*recordNumbers2) - + 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("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(9) 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);") def stop(self): tdSql.close() diff --git a/tests/system-test/fulltest.sh b/tests/system-test/fulltest.sh index f4a5c22d39..2f5cf5536e 100755 --- a/tests/system-test/fulltest.sh +++ b/tests/system-test/fulltest.sh @@ -17,6 +17,7 @@ python3 ./test.py -f 0-others/udf_cfg2.py python3 ./test.py -f 0-others/sysinfo.py python3 ./test.py -f 0-others/user_control.py python3 ./test.py -f 0-others/fsync.py +python3 ./test.py -f 0-others/compatibility.py python3 ./test.py -f 1-insert/influxdb_line_taosc_insert.py python3 ./test.py -f 1-insert/opentsdb_telnet_line_taosc_insert.py -- GitLab