From ac1fcc7031ef547245ba29b00e10bfe77afeb56f Mon Sep 17 00:00:00 2001
From: Nitin Jadhav <nitinjadhav@microsoft.com>
Date: Wed, 12 Feb 2025 07:42:44 +0000
Subject: [PATCH] Fix the bug in 041_checkpoint_at_promote.pl

The code isn't functioning as intended. It should wait for the restart
point operation to complete, but it doesn't due to a small mistake
with the closing parenthesis. The logstart variable should be passed
as the second argument to log_contains(). This patch corrects that issue.
---
 src/test/recovery/t/041_checkpoint_at_promote.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/test/recovery/t/041_checkpoint_at_promote.pl b/src/test/recovery/t/041_checkpoint_at_promote.pl
index cb301d01427..cc5aa80af40 100644
--- a/src/test/recovery/t/041_checkpoint_at_promote.pl
+++ b/src/test/recovery/t/041_checkpoint_at_promote.pl
@@ -110,7 +110,7 @@ $node_standby->safe_psql('postgres',
 my $checkpoint_complete = 0;
 foreach my $i (0 .. 10 * $PostgreSQL::Test::Utils::timeout_default)
 {
-	if ($node_standby->log_contains("restartpoint complete"), $logstart)
+	if ($node_standby->log_contains("restartpoint complete", $logstart))
 	{
 		$checkpoint_complete = 1;
 		last;
-- 
2.43.0

