From 881b267d2fb3b008d5b582f353471bcf8b33420d Mon Sep 17 00:00:00 2001 From: bryanchang0603 Date: Tue, 8 Jun 2021 09:13:25 +0800 Subject: [PATCH] [TD-4473] revertalterkeep.py to older version --- tests/pytest/alter/alter_keep.py | 61 ++++++++------------------------ 1 file changed, 14 insertions(+), 47 deletions(-) diff --git a/tests/pytest/alter/alter_keep.py b/tests/pytest/alter/alter_keep.py index dd9fd08ba6..cb630963a7 100644 --- a/tests/pytest/alter/alter_keep.py +++ b/tests/pytest/alter/alter_keep.py @@ -116,58 +116,25 @@ class TDTestCase: ##TODO: need to wait for TD-4445 to implement the following ## tests - - ## preset the keep - tdSql.prepare() - tdSql.execute('create table tb (ts timestamp, speed int)') - tdSql.execute('alter database db keep 10,10,10') - tdSql.execute('insert into tb values (now, 10)') - tdSql.execute('insert into tb values (now + 10m, 10)') - tdSql.query('select * from tb') - tdSql.checkRows(2) - - - #after alter from small to large, check if the alter if functioning - #test if change through test.py is consistent with change from taos client - #test case for TD-4459 and TD-4445 - tdSql.execute('alter database db keep 40,40,40') - tdSql.query('show databases') - tdSql.checkData(0,7,'40,40,40') - tdSql.error('insert into tb values (now-60d, 10)') - tdSql.execute('insert into tb values (now-30d, 10)') - tdSql.query('select * from tb') - tdSql.checkRows(3) - - rowNum = 3 - for i in range(30): - rowNum += 1 - tdSql.execute('alter database db keep 20,20,20') - tdSql.execute('alter database db keep 40,40,40') - tdSql.query('show databases') - tdSql.checkData(0,7,'40,40,40') - tdSql.error('insert into tb values (now-60d, 10)') - tdSql.execute('insert into tb values (now-30d, 10)') - tdSql.query('select * from tb') - tdSql.checkRows(rowNum) - - tdSql.execute('alter database db keep 10,10,10') - tdSql.query('show databases') - tdSql.checkData(0,7,'10,10,10') - # tdSql.execute('alter database db keep 15,15,15') + # tdSql.prepare() + # tdSql.execute('create table tb (ts timestamp, speed int)') + # tdSql.execute('alter database db keep 10,10,10') + # tdSql.execute('insert into tb values (now, 10)') + # tdSql.execute('insert into tb values (now + 10m, 10)') + # tdSql.query('select * from tb') + # tdSql.checkRows(2) + # tdSql.execute('alter database db keep 40,40,40') # tdSql.query('show databases') - # tdSql.checkData(0,7,'15,15,15') - tdSql.execute('insert into tb values (now-15d, 10)') - tdSql.query('select * from tb') - tdSql.checkRows(rowNum + 1) - + # tdSql.checkData(0,7,'40,40,40') + # tdSql.error('insert into tb values (now-60d, 10)') + # tdSql.execute('insert into tb values (now-30d, 10)') + # tdSql.query('select * from tb') + # tdSql.checkRows(3) # tdSql.execute('alter database db keep 20,20,20') # tdSql.query('show databases') # tdSql.checkData(0,7,'20,20,20') - # tdSql.error('insert into tb values (now-30d, 10)') - # tdSql.query('show databases') - # tdSql.checkData(0,7,'20,20,20') # tdSql.query('select * from tb') - # tdSql.checkRows(rowNum) + # tdSql.checkRows(2) def stop(self): -- GitLab