diff --git a/tests/pytest/alter/alter_keep.py b/tests/pytest/alter/alter_keep.py index dd9fd08ba62f8bb13c58194874b37ffa93fde919..cb630963a7c26a531857f9a39ff715f83c14280d 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):