aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmit Kapila <akapila@postgresql.org>2022-06-24 09:21:24 +0530
committerAmit Kapila <akapila@postgresql.org>2022-06-24 09:21:24 +0530
commit1f50918a6fb02207d151e7cb4aae4c36de9d827c (patch)
tree8168b9374b15b2c6a48c06617e87188275a6408b
parent1ce34519c79e9eed1b6b8dd2f47ae95564e739d7 (diff)
downloadpostgresql-1f50918a6fb02207d151e7cb4aae4c36de9d827c.tar.gz
postgresql-1f50918a6fb02207d151e7cb4aae4c36de9d827c.zip
Fix intermetent test failure in 028_row_filter.pl.
The test was not waiting for the subscriber's data synchronization to happen after refreshing the publication on the subscriber side. This leads subscriber's apply worker to skip applying the changes on the corresponding relation which results in a test failure. Reported-by: Hou Zhijie, as per buildfarm Author: Hou Zhijie Reviewed-by: Masahiko Sawada, Amit Kapila Discussion: https://postgr.es/m/OS0PR01MB5716A69496A8E2F2E155DB8D94B59@OS0PR01MB5716.jpnprd01.prod.outlook.com
-rw-r--r--src/test/subscription/t/028_row_filter.pl5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/test/subscription/t/028_row_filter.pl b/src/test/subscription/t/028_row_filter.pl
index 0dc0a6d10f5..b1fb2d7cae4 100644
--- a/src/test/subscription/t/028_row_filter.pl
+++ b/src/test/subscription/t/028_row_filter.pl
@@ -620,6 +620,11 @@ $node_subscriber->safe_psql('postgres',
"TRUNCATE TABLE tab_rowfilter_partitioned");
$node_subscriber->safe_psql('postgres',
"ALTER SUBSCRIPTION tap_sub REFRESH PUBLICATION WITH (copy_data = true)");
+
+# wait for table synchronization to finish
+$node_subscriber->poll_query_until('postgres', $synced_query)
+ or die "Timed out while waiting for subscriber to synchronize data";
+
$node_publisher->safe_psql('postgres',
"INSERT INTO tab_rowfilter_partitioned (a, b) VALUES(4000, 400),(4001, 401),(4002, 402)"
);