Thread: Fix incorrect order of params in comment

Fix incorrect order of params in comment

From
Daniel Gustafsson
Date:
While writing tests today I noticed that the order of the parameters in the POD
docs for log_check() in PostgreSQL::Test::Cluster is wrong, the first parameter
is the test name.  Will apply the below later today with a backpatch to where
26eaf82e7138 went in.

diff --git a/src/test/perl/PostgreSQL/Test/Cluster.pm b/src/test/perl/PostgreSQL/Test/Cluster.pm
index aa5b5316768..fc08f80e27f 100644
--- a/src/test/perl/PostgreSQL/Test/Cluster.pm
+++ b/src/test/perl/PostgreSQL/Test/Cluster.pm
@@ -2922,7 +2922,7 @@ sub log_content

 =pod

-=item $node->log_check($offset, $test_name, %parameters)
+=item $node->log_check($test_name, $offset, %parameters)

 Check contents of server logs.

--
Daniel Gustafsson




Re: Fix incorrect order of params in comment

From
Daniel Gustafsson
Date:
> On 9 May 2025, at 23:50, Michael Paquier <michael@paquier.xyz> wrote:
> 
> On Fri, May 09, 2025 at 07:21:17PM +0200, Daniel Gustafsson wrote:
>> -=item $node->log_check($offset, $test_name, %parameters)
>> +=item $node->log_check($test_name, $offset, %parameters)
>> 
>> Check contents of server logs.
> 
> Right, good catch.  The internals of the routine use %params instead
> of %parameters, so perhaps this should be changed as well in the
> description?

Good point, not that documentation must match 1:1 but the other functions use
%params in their docs and matching that has value. Done.

--
Daniel Gustafsson