test: update testcases for TD-19943

This commit is contained in:
jiajingbin 2022-10-27 18:06:15 +08:00
parent 4e190d9702
commit 02b841837e
2 changed files with 13 additions and 2 deletions

View File

@ -426,7 +426,17 @@ class TDTestCase:
tdDnodes.stop(1)
tdDnodes.start(1)
tdLog.printNoPrefix("==========step3:insert and flush in rollup database")
tdLog.printNoPrefix("==========step3: sleep 20s for catalogUpdateTableIndex")
tdSql.execute("create database db_s20")
tdSql.execute("use db_s20")
tdSql.execute(f"create stable stb1 (ts timestamp, c1 int) tags (t1 int) sma(c1);")
tdSql.execute("alter stable stb1 add column tinyint_col tinyint")
time.sleep(20)
tdSql.query("select count(*) from stb1")
tdSql.execute("drop database if exists db_s20 ")
tdLog.printNoPrefix("==========step4:insert and flush in rollup database")
tdSql.execute("create database db4 retentions 1s:4m,2s:8m,3s:12m")
tdSql.execute("use db4")
self.__create_tb(rollup="first")
@ -435,7 +445,7 @@ class TDTestCase:
tdSql.execute(f'flush database db4')
tdLog.printNoPrefix("==========step4:after wal, all check again ")
tdLog.printNoPrefix("==========step5:after wal, all check again ")
tdSql.prepare()
self.__create_tb()
self.__insert_data()

View File

@ -29,6 +29,7 @@ class TDTestCase:
time.sleep(self.offset_time * 2)
tdSql.query(f'select * from {self.dbname}.{self.ctbname}')
tdSql.checkEqual(tdSql.queryRows, 0)
tdSql.execute(f'TRIM DATABASE {self.dbname}')
def stop(self):
tdSql.close()