Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Fix test failure in 021_twophase.pl.
authorAmit Kapila <akapila@postgresql.org>
Mon, 2 Aug 2021 02:59:26 +0000 (08:29 +0530)
committerAmit Kapila <akapila@postgresql.org>
Mon, 2 Aug 2021 03:01:48 +0000 (08:31 +0530)
The test is expecting two prepared transactions corresponding to two
subscriptions but it waits to catch up for just one subscription. Fix it
by allowing to wait for both subscriptions.

Reported-by: Michael Paquier, as per buildfarm
Author: Ajin Cherian
Reviewed-By: Amit Kapila, Vignesh C, Peter Smith
Discussion: https://postgr.es/m/CAA4eK1+_0iNQ8Z=KVTjmmAqNX-hyv+1+fnZ-Yx8CVP=uAcekqw@mail.gmail.com

src/test/subscription/t/021_twophase.pl

index 903a771fe3504dc7a1dad442320c71d6862c169a..19f096295f23df427a91723d7891b304c5fbb704 100644 (file)
@@ -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.