Skip to content

Commit

Permalink
Add missing ORDER BY clauses to prevent flakiness
Browse files Browse the repository at this point in the history
  • Loading branch information
naisila committed Apr 5, 2023
1 parent eda3cc4 commit 94d64a3
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 13 deletions.
16 changes: 11 additions & 5 deletions src/test/regress/expected/multi_metadata_sync.out
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,9 @@ FROM
pg_dist_partition
WHERE
logicalrelid = 'mx_test_schema_1.mx_table_1'::regclass
OR logicalrelid = 'mx_test_schema_2.mx_table_2'::regclass;
OR logicalrelid = 'mx_test_schema_2.mx_table_2'::regclass
ORDER BY
logicalrelid;
logicalrelid | repmodel
---------------------------------------------------------------------
mx_test_schema_1.mx_table_1 | s
Expand Down Expand Up @@ -1101,11 +1103,13 @@ FROM
pg_dist_partition
WHERE
logicalrelid = 'mx_colocation_test_1'::regclass
OR logicalrelid = 'mx_colocation_test_2'::regclass;
OR logicalrelid = 'mx_colocation_test_2'::regclass
ORDER BY
logicalrelid;
logicalrelid | colocationid
---------------------------------------------------------------------
mx_colocation_test_2 | 10001
mx_colocation_test_1 | 10001
mx_colocation_test_2 | 10001
(2 rows)

\c - - - :worker_1_port
Expand All @@ -1115,11 +1119,13 @@ FROM
pg_dist_partition
WHERE
logicalrelid = 'mx_colocation_test_1'::regclass
OR logicalrelid = 'mx_colocation_test_2'::regclass;
OR logicalrelid = 'mx_colocation_test_2'::regclass
ORDER BY
logicalrelid;
logicalrelid | colocationid
---------------------------------------------------------------------
mx_colocation_test_2 | 10001
mx_colocation_test_1 | 10001
mx_colocation_test_2 | 10001
(2 rows)

\c - - - :master_port
Expand Down
16 changes: 11 additions & 5 deletions src/test/regress/expected/multi_metadata_sync_0.out
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,9 @@ FROM
pg_dist_partition
WHERE
logicalrelid = 'mx_test_schema_1.mx_table_1'::regclass
OR logicalrelid = 'mx_test_schema_2.mx_table_2'::regclass;
OR logicalrelid = 'mx_test_schema_2.mx_table_2'::regclass
ORDER BY
logicalrelid;
logicalrelid | repmodel
---------------------------------------------------------------------
mx_test_schema_1.mx_table_1 | s
Expand Down Expand Up @@ -1101,11 +1103,13 @@ FROM
pg_dist_partition
WHERE
logicalrelid = 'mx_colocation_test_1'::regclass
OR logicalrelid = 'mx_colocation_test_2'::regclass;
OR logicalrelid = 'mx_colocation_test_2'::regclass
ORDER BY
logicalrelid;
logicalrelid | colocationid
---------------------------------------------------------------------
mx_colocation_test_2 | 10001
mx_colocation_test_1 | 10001
mx_colocation_test_2 | 10001
(2 rows)

\c - - - :worker_1_port
Expand All @@ -1115,11 +1119,13 @@ FROM
pg_dist_partition
WHERE
logicalrelid = 'mx_colocation_test_1'::regclass
OR logicalrelid = 'mx_colocation_test_2'::regclass;
OR logicalrelid = 'mx_colocation_test_2'::regclass
ORDER BY
logicalrelid;
logicalrelid | colocationid
---------------------------------------------------------------------
mx_colocation_test_2 | 10001
mx_colocation_test_1 | 10001
mx_colocation_test_2 | 10001
(2 rows)

\c - - - :master_port
Expand Down
12 changes: 9 additions & 3 deletions src/test/regress/sql/multi_metadata_sync.sql
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,9 @@ FROM
pg_dist_partition
WHERE
logicalrelid = 'mx_test_schema_1.mx_table_1'::regclass
OR logicalrelid = 'mx_test_schema_2.mx_table_2'::regclass;
OR logicalrelid = 'mx_test_schema_2.mx_table_2'::regclass
ORDER BY
logicalrelid;

-- Check that shard and placement data are created
SELECT
Expand Down Expand Up @@ -391,15 +393,19 @@ FROM
pg_dist_partition
WHERE
logicalrelid = 'mx_colocation_test_1'::regclass
OR logicalrelid = 'mx_colocation_test_2'::regclass;
OR logicalrelid = 'mx_colocation_test_2'::regclass
ORDER BY
logicalrelid;
\c - - - :worker_1_port
SELECT
logicalrelid, colocationid
FROM
pg_dist_partition
WHERE
logicalrelid = 'mx_colocation_test_1'::regclass
OR logicalrelid = 'mx_colocation_test_2'::regclass;
OR logicalrelid = 'mx_colocation_test_2'::regclass
ORDER BY
logicalrelid;

\c - - - :master_port

Expand Down

0 comments on commit 94d64a3

Please sign in to comment.