Refactor the recovery tests to not carry a local duplicated copy of
the pump_until function which pumps a process until a defined string
is seen on a stream. This reduces duplication, and is in preparation
for another patch which will also use this functionality.
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion https://postgr.es/m/YgynUafCyIu3jIhC@paquier.xyz
qr/WARNING: terminating connection because of crash of another server process|server closed the connection unexpectedly|connection to server was lost/m
qr/WARNING: terminating connection because of crash of another server process|server closed the connection unexpectedly|connection to server was lost/m
),
),
@ -126,6 +127,7 @@ $killme->finish;
# sending.
# sending.
ok(pump_until(
ok(pump_until(
$monitor,
$monitor,
$psql_timeout,
\$monitor_stderr,
\$monitor_stderr,
qr/WARNING: terminating connection because of crash of another server process|server closed the connection unexpectedly|connection to server was lost/m
qr/WARNING: terminating connection because of crash of another server process|server closed the connection unexpectedly|connection to server was lost/m
qr/server closed the connection unexpectedly|connection to server was lost/m
qr/server closed the connection unexpectedly|connection to server was lost/m
),
),
@ -202,6 +205,7 @@ $killme->finish;
# sending.
# sending.
ok(pump_until(
ok(pump_until(
$monitor,
$monitor,
$psql_timeout,
\$monitor_stderr,
\$monitor_stderr,
qr/WARNING: terminating connection because of crash of another server process|server closed the connection unexpectedly|connection to server was lost/m
qr/WARNING: terminating connection because of crash of another server process|server closed the connection unexpectedly|connection to server was lost/m