Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Add a wait_for_catchup() before immediate stop of a test master.
authorNoah Misch <noah@leadboat.com>
Tue, 14 Apr 2020 01:47:28 +0000 (18:47 -0700)
committerNoah Misch <noah@leadboat.com>
Tue, 14 Apr 2020 01:47:32 +0000 (18:47 -0700)
Per buildfarm member hoverfly, a slow walsender could make the test
fail.  Back-patch to v10, where the test was introduced.

Discussion: https://postgr.es/m/20200414013849.GA886648@rfd.leadboat.com

src/test/recovery/t/010_logical_decoding_timelines.pl

index 1f3d4f72f74f245ef46b5b377c6e8e02b397a200..7114aa7d9678d26448f4b2a800fad84ae0bb479f 100644 (file)
@@ -130,6 +130,7 @@ cmp_ok(
    'xmin on physical slot must not be lower than catalog_xmin');
 
 $node_master->safe_psql('postgres', 'CHECKPOINT');
+$node_master->wait_for_catchup($node_replica, 'write');
 
 # Boom, crash
 $node_master->stop('immediate');