From d5e900ecdb7845b8e87921487f7d80affe1ecf03 Mon Sep 17 00:00:00 2001 From: jiacy-jcy <714897623@qq.com> Date: Mon, 19 Sep 2022 11:27:26 +0800 Subject: [PATCH] update test case --- tests/system-test/1-insert/table_param_ttl.py | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/tests/system-test/1-insert/table_param_ttl.py b/tests/system-test/1-insert/table_param_ttl.py index f5fc2d627b..21c591b07e 100644 --- a/tests/system-test/1-insert/table_param_ttl.py +++ b/tests/system-test/1-insert/table_param_ttl.py @@ -31,51 +31,51 @@ class TDTestCase: tdSql.prepare() for i in range(self.tbnum): - tdSql.execute(f'create table {self.ntbname}_{i} (ts timestamp,c0 int) ttl {self.ttl_param}') - tdSql.query(f'show tables') + tdSql.execute(f'create table db.{self.ntbname}_{i} (ts timestamp,c0 int) ttl {self.ttl_param}') + tdSql.query(f'show db.tables') tdSql.checkRows(self.tbnum) sleep(self.updatecfgDict['ttlUnit']*self.ttl_param+self.updatecfgDict['ttlPushInterval']) - tdSql.query(f'show tables') + tdSql.query(f'show db.tables') tdSql.checkRows(0) for i in range(self.tbnum): - tdSql.execute(f'create table {self.ntbname}_{i} (ts timestamp,c0 int) ttl {self.default_ttl}') + tdSql.execute(f'create table db.{self.ntbname}_{i} (ts timestamp,c0 int) ttl {self.default_ttl}') for i in range(int(self.tbnum/2)): - tdSql.execute(f'alter table {self.ntbname}_{i} ttl {self.modify_ttl}') + tdSql.execute(f'alter table db.{self.ntbname}_{i} ttl {self.modify_ttl}') sleep(self.updatecfgDict['ttlUnit']*self.modify_ttl+self.updatecfgDict['ttlPushInterval']) - tdSql.query(f'show tables') + tdSql.query(f'show db.tables') tdSql.checkRows(self.tbnum - int(self.tbnum/2)) tdSql.execute('drop database db') def ttl_check_ctb(self): 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): - tdSql.execute(f'create table {self.stbname}_{i} using {self.stbname} tags({i}) ttl {self.ttl_param}') - tdSql.query(f'show tables') + tdSql.execute(f'create table db.{self.stbname}_{i} using db.{self.stbname} tags({i}) ttl {self.ttl_param}') + tdSql.query(f'show db.tables') tdSql.checkRows(self.tbnum) sleep(self.updatecfgDict['ttlUnit']*self.ttl_param+self.updatecfgDict['ttlPushInterval']) - tdSql.query(f'show tables') + tdSql.query(f'show db.tables') tdSql.checkRows(0) for i in range(self.tbnum): - tdSql.execute(f'create table {self.stbname}_{i} using {self.stbname} tags({i}) ttl {self.default_ttl}') - tdSql.query(f'show tables') + tdSql.execute(f'create table db.{self.stbname}_{i} using db.{self.stbname} tags({i}) ttl {self.default_ttl}') + tdSql.query(f'show db.tables') tdSql.checkRows(self.tbnum) for i in range(int(self.tbnum/2)): - tdSql.execute(f'alter table {self.stbname}_{i} ttl {self.modify_ttl}') + tdSql.execute(f'alter table db.{self.stbname}_{i} ttl {self.modify_ttl}') sleep(self.updatecfgDict['ttlUnit']*self.modify_ttl+self.updatecfgDict['ttlPushInterval']) - tdSql.query(f'show tables') + tdSql.query(f'show db.tables') tdSql.checkRows(self.tbnum - int(self.tbnum/2)) tdSql.execute('drop database db') def ttl_check_insert(self): 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): - tdSql.execute(f'insert into {self.stbname}_{i} using {self.stbname} tags({i}) ttl {self.ttl_param} values(now,1)') - tdSql.query(f'show tables') + 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 db.tables') tdSql.checkRows(self.tbnum) 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.execute('drop database db') def run(self): -- GitLab