Commit d60cfb6b authored by Noah Misch's avatar Noah Misch

Add a wait_for_catchup() before immediate stop of a test master.

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
parent e56d717d
...@@ -131,6 +131,7 @@ cmp_ok( ...@@ -131,6 +131,7 @@ cmp_ok(
'xmin on physical slot must not be lower than catalog_xmin'); 'xmin on physical slot must not be lower than catalog_xmin');
$node_master->safe_psql('postgres', 'CHECKPOINT'); $node_master->safe_psql('postgres', 'CHECKPOINT');
$node_master->wait_for_catchup($node_replica, 'write');
# Boom, crash # Boom, crash
$node_master->stop('immediate'); $node_master->stop('immediate');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment