Refactor log check logic for connect_ok/fails in PostgreSQL::Test::Cluster
authorMichael Paquier <michael@paquier.xyz>
Fri, 9 Jun 2023 00:37:34 +0000 (09:37 +0900)
committerMichael Paquier <michael@paquier.xyz>
Fri, 9 Jun 2023 00:37:34 +0000 (09:37 +0900)
commit30469a6ed4248b4543e165355a7793329ac041df
tree6339c78027db4b6358cdd67c27119a4ddc5401cd
parentfd3def395081850eddb83cac3c2c0e6862db7f61
Refactor log check logic for connect_ok/fails in PostgreSQL::Test::Cluster

This commit refactors a bit the code in charge of checking for log
patterns when connections fail or succeed, by moving the log pattern
checks into their own routine, for clarity.  This has come up as
something to improve while discussing the refactoring of find_in_log().

Backpatch down to 14 where these routines are used, to ease the
introduction of new tests that could rely on them.

Author: Vignesh C, Michael Paquier
Discussion: https://postgr.es/m/CALDaNm0YSiLpjCmajwLfidQrFOrLNKPQir7s__PeVvh9U3uoTQ@mail.gmail.com
Backpatch-through: 14
src/test/perl/PostgresNode.pm