Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tsma fix ci #25500

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 17 additions & 0 deletions tests/system-test/2-query/tsma.py
Original file line number Diff line number Diff line change
Expand Up @@ -837,6 +837,7 @@ def test_ins_tsma(self):
tdSql.execute('use test')
tdSql.query('show dd.tsmas')
tdSql.checkRows(1)
tdSql.execute('drop tsma dd.tsma_norm_tb_dd')
tdSql.execute('drop database dd')
tdSql.query('select * from information_schema.ins_tsmas')
tdSql.checkRows(3)
Expand Down Expand Up @@ -871,6 +872,7 @@ def test_union(self):
self.create_tsma('tsma_db2_norm_t', 'db2', 'norm_tb', ['avg(c2)', 'last(ts)'], '10m')
sql = 'select avg(c1) as avg_c1 from test.meters union select avg(c2) from db2.norm_tb order by avg_c1'
self.check([TSMAQCBuilder().with_sql(sql).should_query_with_tsma('tsma2').should_query_with_tsma_ctb('db2', 'tsma_db2_norm_t', 'norm_tb').get_qc()])
tdSql.execute('drop tsma db2.tsma_db2_norm_t')
tdSql.execute('drop database db2')
tdSql.execute('use test')

Expand Down Expand Up @@ -931,6 +933,7 @@ def test_long_ctb_name(self):
self.create_tsma(tsma_name, 'db2', tb_name, ['avg(c2)', 'last(ts)'], '10m')
sql = f'select avg(c2), last(ts) from {db_name}.{tb_name}'
self.check([TSMAQCBuilder().with_sql(sql).should_query_with_tsma_ctb('db2', tsma_name, tb_name).get_qc()])
tdSql.execute(f'drop tsma db2.{tsma_name}')
tdSql.execute('drop database db2')
tdSql.execute('use test')

Expand Down Expand Up @@ -1280,6 +1283,8 @@ def test_drop_db(self):
'avg(c1)', 'avg(c2)'], '5m')
self.create_recursive_tsma('tsma1', 'tsma2', 'nsdb', '10m', 'meters')
tdSql.query('select avg(c1) from nsdb.meters', queryTimes=1)
tdSql.execute('drop tsma nsdb.tsma2')
tdSql.execute('drop tsma nsdb.tsma1')
tdSql.execute('drop database nsdb')

def test_tb_ddl_with_created_tsma(self):
Expand Down Expand Up @@ -1332,6 +1337,7 @@ def test_tb_ddl_with_created_tsma(self):
tdSql.error('drop stream tsma1', -2147471088) ## TSMA must be dropped first

self.wait_query('show transactions', 0, 10, lambda row: row[3] != 'stream-checkpo')
tdSql.execute('drop tsma test.tsma_norm_tb')
tdSql.execute('drop database test', queryTimes=1)
self.init_data()

Expand Down Expand Up @@ -1433,6 +1439,17 @@ def test_create_tsma_on_stable(self):
tdSql.error(
'create tsma tsma1 on test.meters function(avg(c1), avg(c2)) interval(2h)', -2147471097)
self.wait_query('show transactions', 0, 10, lambda row: row[3] != 'stream-checkpo')
tdSql.execute('drop tsma nsdb.tsma12')
tdSql.execute('drop tsma nsdb.tsma11')
tdSql.execute('drop tsma nsdb.tsma10')
tdSql.execute('drop tsma nsdb.tsma9')
tdSql.execute('drop tsma test.tsma8')
tdSql.execute('drop tsma nsdb.tsma7')
tdSql.execute('drop tsma nsdb.tsma6')
tdSql.execute('drop tsma nsdb.tsma5')
tdSql.execute('drop tsma nsdb.tsma4')
tdSql.execute('drop tsma test.tsma_test3')
tdSql.execute('drop tsma nsdb.tsma2')
tdSql.execute('drop database nsdb')

def test_create_tsma_on_norm_table(self):
Expand Down