test:add test case of tsbs query
This commit is contained in:
parent
1f5663f03e
commit
8684f75dcd
|
@ -8,7 +8,12 @@ from util.sql import *
|
|||
from util.cases import *
|
||||
|
||||
class TDTestCase:
|
||||
|
||||
|
||||
clientCfgDict = {'queryproxy': '1','debugFlag': 135}
|
||||
clientCfgDict["debugFlag"] = 143
|
||||
updatecfgDict = {'clientCfg': {}}
|
||||
updatecfgDict["clientCfg"] = clientCfgDict
|
||||
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug(f"start to excute {__file__}")
|
||||
tdSql.init(conn.cursor(), True)
|
||||
|
@ -61,10 +66,8 @@ class TDTestCase:
|
|||
# test insert into
|
||||
tdSql.execute("create table testsnode (ts timestamp, c1 float,c2 binary(30),c3 binary(30),c4 binary(30)) ;")
|
||||
tdSql.query("insert into testsnode SELECT ts,avg(velocity) as mean_velocity,name,driver,fleet FROM readings WHERE ts > 1451606400000 AND ts <= 1451606460000 partition BY name,driver,fleet,ts interval(10m);")
|
||||
tdSql.checkRows(1)
|
||||
|
||||
|
||||
tdSql.query("insert into testsnode(c1,c2,c3,c4) SELECT avg(velocity) as mean_velocity,name,driver,fleet FROM readings WHERE ts > 1451606400000 AND ts <= 1451606460000 partition BY name,driver,fleet interval(10m);")
|
||||
tdSql.checkRows(1)
|
||||
|
||||
|
||||
def run(self): # sourcery skip: extract-duplicate-method, remove-redundant-fstring
|
||||
|
|
Loading…
Reference in New Issue