提交 5c7997be 编写于 作者: haoranc's avatar haoranc

test:verify backticks with atuo creating tables

上级 83e232e6
...@@ -76,7 +76,6 @@ class TDTestCase: ...@@ -76,7 +76,6 @@ class TDTestCase:
def run(self): def run(self):
print(f"buildpath:{self.getBuildPath()}")
bPath=self.getBuildPath() bPath=self.getBuildPath()
cPath=self.getCfgPath() cPath=self.getCfgPath()
dbname = "test" dbname = "test"
...@@ -85,7 +84,6 @@ class TDTestCase: ...@@ -85,7 +84,6 @@ class TDTestCase:
tableNumbers=100 tableNumbers=100
recordNumbers1=100 recordNumbers1=100
recordNumbers2=1000 recordNumbers2=1000
# print(tdSql)
tdsqlF=tdCom.newTdSql() tdsqlF=tdCom.newTdSql()
print(tdsqlF) print(tdsqlF)
tdsqlF.query(f"SELECT SERVER_VERSION();") tdsqlF.query(f"SELECT SERVER_VERSION();")
...@@ -111,24 +109,32 @@ class TDTestCase: ...@@ -111,24 +109,32 @@ class TDTestCase:
self.buildTaosd(bPath) self.buildTaosd(bPath)
tdDnodes.start(1) tdDnodes.start(1)
sleep(1) sleep(1)
tdsql_new=tdCom.newTdSql() tdsql=tdCom.newTdSql()
print(tdsql_new) print(tdsql)
tdsql_new.query(f"SELECT SERVER_VERSION();") tdsql.query(f"SELECT SERVER_VERSION();")
nowServerVersion=tdsql_new.queryResult[0][0] nowServerVersion=tdsql.queryResult[0][0]
tdLog.info(f"New server version is {nowServerVersion}") tdLog.info(f"New server version is {nowServerVersion}")
tdsql_new.query(f"SELECT CLIENT_VERSION();") tdsql.query(f"SELECT CLIENT_VERSION();")
nowClientVersion=tdsql_new.queryResult[0][0] nowClientVersion=tdsql.queryResult[0][0]
tdLog.info(f"New client version is {nowClientVersion}") tdLog.info(f"New client version is {nowClientVersion}")
tdLog.printNoPrefix(f"==========step3:prepare and check data in new version-{nowServerVersion}") tdLog.printNoPrefix(f"==========step3:prepare and check data in new version-{nowServerVersion}")
tdsql_new.query(f"select count(*) from {stb}") tdsql.query(f"select count(*) from {stb}")
tdsql_new.checkData(0,0,tableNumbers*recordNumbers1) tdsql.checkData(0,0,tableNumbers*recordNumbers1)
os.system(f"taosBenchmark -t {tableNumbers} -n {recordNumbers2} -y ") os.system(f"taosBenchmark -t {tableNumbers} -n {recordNumbers2} -y ")
tdsql_new.query(f"select count(*) from {stb}") tdsql.query(f"select count(*) from {stb}")
tdsql_new.checkData(0,0,tableNumbers*recordNumbers2) 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): def stop(self):
tdSql.close() tdSql.close()
......
...@@ -17,6 +17,7 @@ python3 ./test.py -f 0-others/udf_cfg2.py ...@@ -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/sysinfo.py
python3 ./test.py -f 0-others/user_control.py python3 ./test.py -f 0-others/user_control.py
python3 ./test.py -f 0-others/fsync.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/influxdb_line_taosc_insert.py
python3 ./test.py -f 1-insert/opentsdb_telnet_line_taosc_insert.py python3 ./test.py -f 1-insert/opentsdb_telnet_line_taosc_insert.py
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册