From d939385aa2a3ec32716c7070e6e6e0599a92c4ef Mon Sep 17 00:00:00 2001 From: Hanefi Onaldi Date: Mon, 8 May 2023 18:29:30 +0300 Subject: [PATCH] Fix a test that is falsely classified as flaky This test is written in such a way that it fails when run consecutively. The test assumes that the second worker nodes does not have metadata, but after the whole test file is executed, the worker has the metadata. Therefore all the runs after the first one fails. --- .../expected/multi_unsupported_worker_operations.out | 9 ++++++++- .../regress/sql/multi_unsupported_worker_operations.sql | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/test/regress/expected/multi_unsupported_worker_operations.out b/src/test/regress/expected/multi_unsupported_worker_operations.out index bd74a4f4a..f93e57b1e 100644 --- a/src/test/regress/expected/multi_unsupported_worker_operations.out +++ b/src/test/regress/expected/multi_unsupported_worker_operations.out @@ -157,6 +157,13 @@ SELECT master_remove_node('localhost', 5432); (1 row) +SELECT stop_metadata_sync_to_node('localhost', :worker_2_port); +NOTICE: dropping metadata on the node (localhost,57638) + stop_metadata_sync_to_node +--------------------------------------------------------------------- + +(1 row) + \c - - - :worker_1_port UPDATE pg_dist_partition SET colocationid = 0 WHERE logicalrelid='mx_table_2'::regclass; SELECT update_distributed_table_colocation('mx_table', colocate_with => 'mx_table_2'); @@ -181,7 +188,7 @@ HINT: Connect to the coordinator and run it again. SELECT hasmetadata FROM pg_dist_node WHERE nodeport=:worker_2_port; hasmetadata --------------------------------------------------------------------- - t + f (1 row) -- stop_metadata_sync_to_node diff --git a/src/test/regress/sql/multi_unsupported_worker_operations.sql b/src/test/regress/sql/multi_unsupported_worker_operations.sql index 3e41a5e77..1069dbf47 100644 --- a/src/test/regress/sql/multi_unsupported_worker_operations.sql +++ b/src/test/regress/sql/multi_unsupported_worker_operations.sql @@ -96,6 +96,7 @@ SELECT count(1) FROM pg_dist_node WHERE nodename='localhost' AND nodeport=5432; \c - - - :master_port SELECT master_remove_node('localhost', 5432); +SELECT stop_metadata_sync_to_node('localhost', :worker_2_port); \c - - - :worker_1_port