chore: test case optimization

This commit is contained in:
kailixu 2023-03-17 19:16:01 +08:00
parent 5d82380993
commit f3b4dbd2b5
1 changed files with 9 additions and 12 deletions

View File

@ -112,14 +112,12 @@ class TDTestCase:
tdSql.execute(self.stb4096) tdSql.execute(self.stb4096)
for k in range(10): for k in range(10):
tdSql.execute("create table db2.ctb_%d_%dc using db2.stb%d tags(%d)" %(i,k,i,k)) tdSql.execute("create table db2.ctb_%d_%dc using db2.stb%d tags(%d)" %(i,k,i,k))
tdSql.query(f'select * from information_schema.ins_columns where db_name="db2" and table_type=="SUPER_TABLE"') for t in range (2):
tdSql.checkEqual(20465,len(tdSql.queryResult)) tdSql.query(f'select * from information_schema.ins_columns where db_name="db2" and table_type=="SUPER_TABLE"')
tdSql.query(f'select * from information_schema.ins_columns where db_name="db2" and table_type=="SUPER_TABLE"') tdSql.checkEqual(20465,len(tdSql.queryResult))
tdSql.checkEqual(20465,len(tdSql.queryResult)) for t in range (2):
tdSql.query(f'select * from information_schema.ins_columns where db_name="db2" and table_type=="CHILD_TABLE"') tdSql.query(f'select * from information_schema.ins_columns where db_name="db2" and table_type=="CHILD_TABLE"')
tdSql.checkEqual(204650,len(tdSql.queryResult)) tdSql.checkEqual(204650,len(tdSql.queryResult))
tdSql.query(f'select * from information_schema.ins_columns where db_name="db2" and table_type=="CHILD_TABLE"')
tdSql.checkEqual(204650,len(tdSql.queryResult))
for i in range (5): for i in range (5):
self.ntb4096 = 'create table db2.ntb%d (ts timestamp' % (i) self.ntb4096 = 'create table db2.ntb%d (ts timestamp' % (i)
@ -127,10 +125,9 @@ class TDTestCase:
self.ntb4096 += ', c%d binary(10)' % (j) self.ntb4096 += ', c%d binary(10)' % (j)
self.ntb4096 += ')' self.ntb4096 += ')'
tdSql.execute(self.ntb4096) tdSql.execute(self.ntb4096)
tdSql.query(f'select * from information_schema.ins_columns where db_name="db2" and table_type=="NORMAL_TABLE"') for t in range (2):
tdSql.checkEqual(20470,len(tdSql.queryResult)) tdSql.query(f'select * from information_schema.ins_columns where db_name="db2" and table_type=="NORMAL_TABLE"')
tdSql.query(f'select * from information_schema.ins_columns where db_name="db2" and table_type=="NORMAL_TABLE"') tdSql.checkEqual(20470,len(tdSql.queryResult))
tdSql.checkEqual(20470,len(tdSql.queryResult))
def run(self): def run(self):
self.prepare_data() self.prepare_data()