未验证 提交 a6db3100 编写于 作者: J Jason-Jia 提交者: GitHub

Update table_param_ttl.py

上级 0f78a600
...@@ -69,13 +69,13 @@ class TDTestCase: ...@@ -69,13 +69,13 @@ class TDTestCase:
def ttl_check_insert(self): def ttl_check_insert(self):
tdSql.prepare() tdSql.prepare()
tdSql.execute(f'create table {self.stbname} (ts timestamp,c0 int) tags(t0 int)') tdSql.execute(f'create table db.{self.stbname} (ts timestamp,c0 int) tags(t0 int)')
for i in range(self.tbnum): for i in range(self.tbnum):
tdSql.execute(f'insert into {self.stbname}_{i} using {self.stbname} tags({i}) ttl {self.ttl_param} values(now,1)') tdSql.execute(f'insert into db.{self.stbname}_{i} using db.{self.stbname} tags({i}) ttl {self.ttl_param} values(now,1)')
tdSql.query(f'show tables') tdSql.query(f'show db.tables')
tdSql.checkRows(self.tbnum) tdSql.checkRows(self.tbnum)
sleep(self.updatecfgDict['ttlUnit']*self.ttl_param+self.updatecfgDict['ttlPushInterval']) sleep(self.updatecfgDict['ttlUnit']*self.ttl_param+self.updatecfgDict['ttlPushInterval'])
tdSql.query(f'show tables') tdSql.query(f'show db.tables')
tdSql.checkRows(0) tdSql.checkRows(0)
tdSql.execute('drop database db') tdSql.execute('drop database db')
def run(self): def run(self):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册