enh: add test case
This commit is contained in:
parent
0c4e863b56
commit
fe32bf6833
|
@ -223,6 +223,7 @@
|
||||||
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/agg_group_NotReturnValue.py -Q 2
|
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/agg_group_NotReturnValue.py -Q 2
|
||||||
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/agg_group_NotReturnValue.py -Q 3
|
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/agg_group_NotReturnValue.py -Q 3
|
||||||
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/agg_group_NotReturnValue.py -Q 4
|
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/agg_group_NotReturnValue.py -Q 4
|
||||||
|
,,y,system-test,./pytest.sh python3 ./test.py -f 2-query/td-32548.py
|
||||||
|
|
||||||
,,y,system-test,./pytest.sh python3 ./test.py -f 3-enterprise/restore/restoreDnode.py -N 5 -M 3 -i False
|
,,y,system-test,./pytest.sh python3 ./test.py -f 3-enterprise/restore/restoreDnode.py -N 5 -M 3 -i False
|
||||||
,,y,system-test,./pytest.sh python3 ./test.py -f 3-enterprise/restore/restoreVnode.py -N 5 -M 3 -i False
|
,,y,system-test,./pytest.sh python3 ./test.py -f 3-enterprise/restore/restoreVnode.py -N 5 -M 3 -i False
|
||||||
|
@ -1254,7 +1255,7 @@
|
||||||
,,y,script,./test.sh -f tsim/query/unionall_as_table.sim
|
,,y,script,./test.sh -f tsim/query/unionall_as_table.sim
|
||||||
,,y,script,./test.sh -f tsim/query/multi_order_by.sim
|
,,y,script,./test.sh -f tsim/query/multi_order_by.sim
|
||||||
,,y,script,./test.sh -f tsim/query/sys_tbname.sim
|
,,y,script,./test.sh -f tsim/query/sys_tbname.sim
|
||||||
,,y,script,./test.sh -f tsim/query/sort-pre-cols.sim
|
,,y,script,./test.sh -f tsim/query/sort-pre-cols.sim
|
||||||
,,y,script,./test.sh -f tsim/query/groupby.sim
|
,,y,script,./test.sh -f tsim/query/groupby.sim
|
||||||
,,y,script,./test.sh -f tsim/query/groupby_distinct.sim
|
,,y,script,./test.sh -f tsim/query/groupby_distinct.sim
|
||||||
,,y,script,./test.sh -f tsim/query/event.sim
|
,,y,script,./test.sh -f tsim/query/event.sim
|
||||||
|
@ -1262,7 +1263,7 @@
|
||||||
,,y,script,./test.sh -f tsim/query/emptyTsRange.sim
|
,,y,script,./test.sh -f tsim/query/emptyTsRange.sim
|
||||||
,,y,script,./test.sh -f tsim/query/emptyTsRange_scl.sim
|
,,y,script,./test.sh -f tsim/query/emptyTsRange_scl.sim
|
||||||
,,y,script,./test.sh -f tsim/query/partitionby.sim
|
,,y,script,./test.sh -f tsim/query/partitionby.sim
|
||||||
,,y,script,./test.sh -f tsim/query/tableCount.sim
|
,,y,script,./test.sh -f tsim/query/tableCount.sim
|
||||||
,,y,script,./test.sh -f tsim/query/show_db_table_kind.sim
|
,,y,script,./test.sh -f tsim/query/show_db_table_kind.sim
|
||||||
,,y,script,./test.sh -f tsim/query/bi_star_table.sim
|
,,y,script,./test.sh -f tsim/query/bi_star_table.sim
|
||||||
,,y,script,./test.sh -f tsim/query/bi_tag_scan.sim
|
,,y,script,./test.sh -f tsim/query/bi_tag_scan.sim
|
||||||
|
@ -1532,8 +1533,8 @@
|
||||||
,,n,script,./test.sh -f tsim/tagindex/sma_and_tag_index.sim
|
,,n,script,./test.sh -f tsim/tagindex/sma_and_tag_index.sim
|
||||||
,,y,script,./test.sh -f tsim/tagindex/indexOverflow.sim
|
,,y,script,./test.sh -f tsim/tagindex/indexOverflow.sim
|
||||||
,,y,script,./test.sh -f tsim/view/view.sim
|
,,y,script,./test.sh -f tsim/view/view.sim
|
||||||
,,y,script,./test.sh -f tsim/query/cache_last.sim
|
,,y,script,./test.sh -f tsim/query/cache_last.sim
|
||||||
,,y,script,./test.sh -f tsim/query/const.sim
|
,,y,script,./test.sh -f tsim/query/const.sim
|
||||||
,,y,script,./test.sh -f tsim/query/nestedJoinView.sim
|
,,y,script,./test.sh -f tsim/query/nestedJoinView.sim
|
||||||
|
|
||||||
|
|
||||||
|
@ -1566,4 +1567,3 @@
|
||||||
,,n,docs-examples-test,bash rust.sh
|
,,n,docs-examples-test,bash rust.sh
|
||||||
,,n,docs-examples-test,bash go.sh
|
,,n,docs-examples-test,bash go.sh
|
||||||
,,n,docs-examples-test,bash test_R.sh
|
,,n,docs-examples-test,bash test_R.sh
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
from util.cases import *
|
||||||
|
from util.sql import *
|
||||||
|
|
||||||
|
class TDTestCase:
|
||||||
|
def init(self, conn, logSql, replicaVar=1):
|
||||||
|
tdLog.debug("start to execute %s" % __file__)
|
||||||
|
tdSql.init(conn.cursor(), True)
|
||||||
|
|
||||||
|
tdSql.execute("drop database if exists td_32548;")
|
||||||
|
tdSql.execute("create database td_32548 cachemodel 'last_row' keep 3650,3650,3650;")
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
tdSql.execute("use td_32548;")
|
||||||
|
|
||||||
|
tdSql.execute("create table ntb1 (ts timestamp, ival int);")
|
||||||
|
tdSql.execute("insert into ntb1 values ('2024-07-08 17:54:49.675', 54);")
|
||||||
|
|
||||||
|
tdSql.execute("flush database td_32548;")
|
||||||
|
|
||||||
|
tdSql.execute("insert into ntb1 values ('2024-07-08 17:53:49.675', 53);")
|
||||||
|
tdSql.execute("insert into ntb1 values ('2024-07-08 17:52:49.675', 52);")
|
||||||
|
tdSql.execute("delete from ntb1 where ts = '2024-07-08 17:54:49.675';")
|
||||||
|
|
||||||
|
tdSql.query('select last_row(ts) from ntb1;')
|
||||||
|
tdSql.checkData(0, 0, '2024-07-08 17:53:49.675')
|
||||||
|
|
||||||
|
def stop(self):
|
||||||
|
tdSql.close()
|
||||||
|
tdLog.success(f"{__file__} successfully executed")
|
||||||
|
|
||||||
|
tdCases.addLinux(__file__, TDTestCase())
|
||||||
|
tdCases.addWindows(__file__, TDTestCase())
|
Loading…
Reference in New Issue