Refactor log check logic for connect_ok/fails in PostgreSQL::Test::Cluster
authorMichael Paquier <michael@paquier.xyz>
Fri, 9 Jun 2023 00:37:21 +0000 (09:37 +0900)
committerMichael Paquier <michael@paquier.xyz>
Fri, 9 Jun 2023 00:37:21 +0000 (09:37 +0900)
commit26eaf82e7138890022d5d06b77eb745524542fb7
tree7f3d77a34b327bbb4511125965d4a7e2265ab8b6
parent9a2dbc614e6e47da3c49daacec106da32eba9467
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/PostgreSQL/Test/Cluster.pm