v1-0001-Fix-possible-failure-in-021_twophase-tap-test.patch

application/octet-stream

Filename: v1-0001-Fix-possible-failure-in-021_twophase-tap-test.patch
Type: application/octet-stream
Part: 0
Message: Re: [HACKERS] logical decoding of two-phase transactions

Patch

Format: format-patch
Series: patch v1-0001
Subject: Fix possible failure in 021_twophase tap test
File+
src/test/subscription/t/021_twophase.pl 2 0
From c18e9f0b2d84140e3d57e4a893d0826d7dc7064c Mon Sep 17 00:00:00 2001
From: Ajin Cherian <ajinc@fast.au.fujitsu.com>
Date: Sat, 31 Jul 2021 01:35:01 -0400
Subject: [PATCH v1] Fix possible failure in 021_twophase tap test

Change the test so that it waits for both subscriptions to catchup
before checking the prepared transaction count.
---
 src/test/subscription/t/021_twophase.pl | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/test/subscription/t/021_twophase.pl b/src/test/subscription/t/021_twophase.pl
index 903a771..19f0962 100644
--- a/src/test/subscription/t/021_twophase.pl
+++ b/src/test/subscription/t/021_twophase.pl
@@ -316,7 +316,9 @@ $node_publisher->safe_psql('postgres', "
     INSERT INTO tab_copy VALUES (99);
     PREPARE TRANSACTION 'mygid';");
 
+# Wait for both subscribers to catchup
 $node_publisher->wait_for_catchup($appname_copy);
+$node_publisher->wait_for_catchup($appname);
 
 # Check that the transaction has been prepared on the subscriber, there will be 2
 # prepared transactions for the 2 subscriptions.
-- 
1.8.3.1