test:fix comatibility case
This commit is contained in:
parent
a0c5d130ae
commit
5dbab16bf6
|
@ -794,9 +794,10 @@
|
|||
,,y,script,./test.sh -f tsim/user/basic.sim
|
||||
,,y,script,./test.sh -f tsim/user/password.sim
|
||||
,,y,script,./test.sh -f tsim/user/privilege_db.sim
|
||||
#,,y,script,./test.sh -f tsim/user/privilege_sysinfo.sim
|
||||
,,y,script,./test.sh -f tsim/user/privilege_sysinfo.sim
|
||||
,,y,script,./test.sh -f tsim/user/privilege_topic.sim
|
||||
,,y,script,./test.sh -f tsim/user/privilege_table.sim
|
||||
,,y,script,./test.sh -f tsim/user/privilege_create_db.sim
|
||||
,,y,script,./test.sh -f tsim/db/alter_option.sim
|
||||
,,y,script,./test.sh -f tsim/db/alter_replica_31.sim
|
||||
,,y,script,./test.sh -f tsim/db/basic1.sim
|
||||
|
@ -969,6 +970,7 @@
|
|||
,,y,script,./test.sh -f tsim/query/tag_scan.sim
|
||||
,,y,script,./test.sh -f tsim/query/nullColSma.sim
|
||||
,,y,script,./test.sh -f tsim/query/bug3398.sim
|
||||
,,y,script,./test.sh -f tsim/query/explain_tsorder.sim
|
||||
,,y,script,./test.sh -f tsim/qnode/basic1.sim
|
||||
,,y,script,./test.sh -f tsim/snode/basic1.sim
|
||||
,,y,script,./test.sh -f tsim/mnode/basic1.sim
|
||||
|
|
|
@ -138,6 +138,8 @@ class TDTestCase:
|
|||
tdLog.printNoPrefix(f"==========step1:prepare and check data in old version-{BASEVERSION}")
|
||||
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 ")
|
||||
os.system("LD_LIBRARY_PATH=/usr/lib taos -s 'flush database test '")
|
||||
|
||||
# os.system(f"LD_LIBRARY_PATH=/usr/lib taos -s 'use test;create stream current_stream into current_stream_output_stb as select _wstart as `start`, _wend as wend, max(current) as max_current from meters where voltage <= 220 interval (5s);' ")
|
||||
# os.system('LD_LIBRARY_PATH=/usr/lib taos -s "use test;create stream power_stream into power_stream_output_stb as select ts, concat_ws(\\".\\", location, tbname) as meter_location, current*voltage*cos(phase) as active_power, current*voltage*sin(phase) as reactive_power from meters partition by tbname;" ')
|
||||
# os.system('LD_LIBRARY_PATH=/usr/lib taos -s "use test;show streams;" ')
|
||||
|
@ -151,6 +153,10 @@ class TDTestCase:
|
|||
os.system("LD_LIBRARY_PATH=/usr/lib taos -s 'flush database db4096 '")
|
||||
os.system("LD_LIBRARY_PATH=/usr/lib taos -f 0-others/TS-3131.tsql")
|
||||
|
||||
# add deleted data
|
||||
os.system("LD_LIBRARY_PATH=/usr/lib taos -f 0-others/deletedData.sql")
|
||||
|
||||
|
||||
cmd = f" LD_LIBRARY_PATH={bPath}/build/lib {bPath}/build/bin/taos -h localhost ;"
|
||||
tdLog.info(f"new client version connect to old version taosd, commad return value:{cmd}")
|
||||
if os.system(cmd) == 0:
|
||||
|
@ -185,11 +191,18 @@ class TDTestCase:
|
|||
# tdsql.query("show streams;")
|
||||
# tdsql.query(f"select count(*) from {stb}")
|
||||
# tdsql.checkData(0,0,tableNumbers*recordNumbers2)
|
||||
tdsql.query(f"select count(*) from db4096.stb0")
|
||||
|
||||
# checkout db4096
|
||||
tdsql.query("select count(*) from db4096.stb0")
|
||||
tdsql.checkData(0,0,50000)
|
||||
|
||||
# checkout deleted data
|
||||
tdsql.execute("insert into deldata.ct1 values ( now()-0s, 0, 0, 0, 0, 0.0, 0.0, 0, 'binary0', 'nchar0', now()+0a ) ( now()-10s, 1, 11111, 111, 11, 1.11, 11.11, 1, 'binary1', 'nchar1', now()+1a ) ( now()-20s, 2, 22222, 222, 22, 2.22, 22.22, 0, 'binary2', 'nchar2', now()+2a ) ( now()-30s, 3, 33333, 333, 33, 3.33, 33.33, 1, 'binary3', 'nchar3', now()+3a );")
|
||||
tdsql.query("flush database deldata;select avg(c1) from deldata.ct1;")
|
||||
|
||||
|
||||
tdsql=tdCom.newTdSql()
|
||||
tdLog.printNoPrefix(f"==========step4:verify backticks in taos Sql-TD18542")
|
||||
tdLog.printNoPrefix("==========step4:verify backticks in taos Sql-TD18542")
|
||||
tdsql.execute("drop database if exists db")
|
||||
tdsql.execute("create database db")
|
||||
tdsql.execute("use db")
|
||||
|
@ -203,6 +216,8 @@ class TDTestCase:
|
|||
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)
|
||||
|
||||
#check retentions
|
||||
tdsql=tdCom.newTdSql()
|
||||
tdsql.query("describe information_schema.ins_databases;")
|
||||
qRows=tdsql.queryRows
|
||||
|
@ -222,8 +237,12 @@ class TDTestCase:
|
|||
caller = inspect.getframeinfo(inspect.stack()[0][0])
|
||||
args = (caller.filename, caller.lineno)
|
||||
tdLog.exit("%s(%d) failed" % args)
|
||||
|
||||
# check stream
|
||||
tdsql.query("show streams;")
|
||||
tdsql.checkRows(0)
|
||||
|
||||
#check TS-3131
|
||||
tdsql.query("select *,tbname from d0.almlog where mcid='m0103';")
|
||||
tdsql.checkRows(6)
|
||||
expectList = [0,3003,20031,20032,20033,30031]
|
||||
|
@ -238,6 +257,8 @@ class TDTestCase:
|
|||
tdsql.execute("insert into test.d80 values (now+1s, 11, 103, 0.21);")
|
||||
tdsql.execute("insert into test.d9 values (now+5s, 4.3, 104, 0.4);")
|
||||
|
||||
|
||||
# check tmq
|
||||
conn = taos.connect()
|
||||
|
||||
consumer = Consumer(
|
||||
|
@ -265,6 +286,8 @@ class TDTestCase:
|
|||
print(block.fetchall())
|
||||
tdsql.query("show topics;")
|
||||
tdsql.checkRows(1)
|
||||
|
||||
|
||||
def stop(self):
|
||||
tdSql.close()
|
||||
tdLog.success(f"{__file__} successfully executed")
|
||||
|
|
Loading…
Reference in New Issue