diff --git a/tests/pytest/fulltest.sh b/tests/pytest/fulltest.sh index 61e82789ea665a9880f45566253e3916bd40163a..58e4fbfc1c44911e1a2e47dd0d2219a0721af3d8 100755 --- a/tests/pytest/fulltest.sh +++ b/tests/pytest/fulltest.sh @@ -302,6 +302,7 @@ python3 testMinTablesPerVnode.py python3 queryCount.py python3 ./test.py -f query/queryGroupbyWithInterval.py python3 client/twoClients.py +python3 ./test.py -f query/query.py python3 test.py -f query/queryInterval.py python3 test.py -f query/queryFillTest.py diff --git a/tests/pytest/query/query.py b/tests/pytest/query/query.py index eaec42721a8d78d8469e788732f4277e2d321939..7bec22b925ba41fd28a01dda84705d7263305382 100644 --- a/tests/pytest/query/query.py +++ b/tests/pytest/query/query.py @@ -13,10 +13,10 @@ import sys import taos -from util.log import tdLog -from util.cases import tdCases -from util.sql import tdSql -from util.dnodes import tdDnodes +from util.log import * +from util.cases import * +from util.sql import * +from util.dnodes import * class TDTestCase: @@ -26,6 +26,18 @@ class TDTestCase: self.ts = 1538548685000 + def bug_6387(self): + tdSql.execute("create database bug6387 ") + tdSql.execute("use bug6387 ") + tdSql.execute("create table test(ts timestamp, c1 int) tags(t1 int)") + for i in range(5000): + sql = "insert into t%d using test tags(1) values " % i + for j in range(21): + sql = sql + "(now+%ds,%d)" % (j ,j ) + tdSql.execute(sql) + tdSql.query("select count(*) from test interval(1s) group by tbname") + tdSql.checkData(0,1,1) + def run(self): tdSql.prepare() @@ -120,15 +132,21 @@ class TDTestCase: tdSql.execute("insert into 'Tb0' using tb tags(1) values(now, 1)") tdSql.query("select * from tb") tdSql.checkRows(1) + tdSql.query("select * from tb0") + tdSql.checkRows(1) # For jira:https://jira.taosdata.com:18080/browse/TD-6314 tdSql.execute("use db") tdSql.execute("create stable stb_001(ts timestamp,v int) tags(c0 int)") + tdSql.execute("insert into stb1 using stb_001 tags(1) values(now,1)") tdSql.query("select _block_dist() from stb_001") tdSql.checkRows(1) - tdSql.query("select * from tb0") - tdSql.checkRows(1) + + + #For jira: https://jira.taosdata.com:18080/browse/TD-6387 + tdLog.info("case for bug_6387") + self.bug_6387() def stop(self): tdSql.close()