提交 a837f337 编写于 作者: P Ping Xiao

[TD-2298] <test> add test case for interval

上级 0b3741d6
...@@ -160,6 +160,7 @@ python3 ./test.py -f query/bug1874.py ...@@ -160,6 +160,7 @@ python3 ./test.py -f query/bug1874.py
python3 ./test.py -f query/bug1875.py python3 ./test.py -f query/bug1875.py
python3 ./test.py -f query/bug1876.py python3 ./test.py -f query/bug1876.py
python3 ./test.py -f query/bug2218.py python3 ./test.py -f query/bug2218.py
python3 ./test.py -f query/sliding.py
#stream #stream
python3 ./test.py -f stream/metric_1.py python3 ./test.py -f stream/metric_1.py
......
...@@ -16,6 +16,7 @@ import taos ...@@ -16,6 +16,7 @@ import taos
from util.log import tdLog from util.log import tdLog
from util.cases import tdCases from util.cases import tdCases
from util.sql import tdSql from util.sql import tdSql
from util.dnodes import tdDnodes
class TDTestCase: class TDTestCase:
...@@ -72,6 +73,19 @@ class TDTestCase: ...@@ -72,6 +73,19 @@ class TDTestCase:
tdSql.checkData(6, 0, "2020-09-16 00:00:00") tdSql.checkData(6, 0, "2020-09-16 00:00:00")
tdSql.checkData(6, 1, 222.0) tdSql.checkData(6, 1, 222.0)
# test case for https://jira.taosdata.com:18080/browse/TD-2298
tdSql.execute("create database test keep 36500")
tdSql.execute("use test")
tdSql.execute("create table t (ts timestamp, voltage int)")
for i in range(10000):
tdSql.execute("insert into t values(%d, 0)" % (1000000 + i * 6000))
tdDnodes.stop(1)
tdDnodes.start(1)
tdSql.query("select last(*) from t interval(1s)")
tdSql.checkRows(10000)
def stop(self): def stop(self):
tdSql.close() tdSql.close()
tdLog.success("%s successfully executed" % __file__) tdLog.success("%s successfully executed" % __file__)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册