add cases

This commit is contained in:
Ganlin Zhao 2023-08-24 17:11:58 +08:00
parent 7396a7c09c
commit 2a5f4a3bc4
1 changed files with 12 additions and 0 deletions

View File

@ -101,6 +101,18 @@ class TDTestCase:
self.now_check_ntb() self.now_check_ntb()
self.now_check_stb() self.now_check_stb()
## TD-25540
tdSql.execute(f'create database db1')
tdSql.execute(f'use db1')
tdSql.execute(f"create table tb (ts timestamp, c0 int)")
tdSql.execute(f'insert into db1.tb values(now + 1h, 1)')
for func in {"NOW", "NOW()", "TODAY()", "1", "'1970-01-01 00:00:00'"}:
tdSql.query(f"SELECT _wstart, count(*) FROM (SELECT ts, LAST(c0) FROM tb WHERE ts > {func}) interval(1d);")
tdSql.checkRows(1)
def stop(self): def stop(self):
tdSql.close() tdSql.close()
tdLog.success(f"{__file__} successfully executed") tdLog.success(f"{__file__} successfully executed")