From 648898f8da9b3e75c56eaabaef44c1e493217ab4 Mon Sep 17 00:00:00 2001
From: Daniel Gustafsson <dgustafsson@postgresql.org>
Date: Tue, 9 Apr 2024 18:05:19 +0200
Subject: [PATCH v1 3/3] Clean up BackgroundPsql object when test ends

The BackgroundPsql object must be cleaned up at the end of tests to
avoid leaks, ensure that finish() is called before exiting the suite
with done_testing().
---
 src/test/recovery/t/043_wal_replay_wait.pl | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/test/recovery/t/043_wal_replay_wait.pl b/src/test/recovery/t/043_wal_replay_wait.pl
index bbd64aa67b..3a469ddf59 100644
--- a/src/test/recovery/t/043_wal_replay_wait.pl
+++ b/src/test/recovery/t/043_wal_replay_wait.pl
@@ -94,4 +94,5 @@ $node_standby->wait_for_log('recovery is not in progress', $log_offset);
 
 $node_standby->stop;
 $node_primary->stop;
+$psql_session->{run}->finish;
 done_testing();
-- 
2.39.3 (Apple Git-146)

