Skip to content

Commit

Permalink
Remove some cagg_migrate test flakiness
Browse files Browse the repository at this point in the history
During some tests on #7104 I've noticed some flakiness on Continuous
Aggregates migration tests due to some output ordering.

Fixed it by explicity order policies by their IDs.
  • Loading branch information
fabriziomello committed Oct 11, 2024
1 parent 7ec7630 commit cf0faa2
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 37 deletions.
4 changes: 2 additions & 2 deletions sql/cagg_migrate.sql
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ BEGIN
END IF;

-- get all scheduled policies except the refresh
SELECT jsonb_build_object('policies', array_agg(id))
SELECT jsonb_build_object('policies', array_agg(id ORDER BY id))
INTO _policies
FROM _timescaledb_config.bgw_job
WHERE hypertable_id = _cagg_data.mat_hypertable_id
Expand Down Expand Up @@ -192,7 +192,7 @@ BEGIN
EXECUTE _sql;

-- get all scheduled policies
SELECT jsonb_build_object('policies', array_agg(id))
SELECT jsonb_build_object('policies', array_agg(id ORDER BY id))
INTO _policies
FROM _timescaledb_config.bgw_job
WHERE hypertable_id = _cagg_data.mat_hypertable_id
Expand Down
Loading

0 comments on commit cf0faa2

Please sign in to comment.