aboutsummaryrefslogtreecommitdiff
path: root/src/test/perl/PostgresNode.pm
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/perl/PostgresNode.pm')
-rw-r--r--src/test/perl/PostgresNode.pm8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/test/perl/PostgresNode.pm b/src/test/perl/PostgresNode.pm
index 98fddbf9cd3..f2381c0c361 100644
--- a/src/test/perl/PostgresNode.pm
+++ b/src/test/perl/PostgresNode.pm
@@ -1673,9 +1673,6 @@ sub command_checks_all
Run a command on the node, then verify that $expected_sql appears in the
server log file.
-Reads the whole log file so be careful when working with large log outputs.
-The log file is truncated prior to running the command, however.
-
=cut
sub issues_sql_like
@@ -1687,10 +1684,11 @@ sub issues_sql_like
local $ENV{PGHOST} = $self->host;
local $ENV{PGPORT} = $self->port;
- truncate $self->logfile, 0;
+ my $log_location = -s $self->logfile;
+
my $result = TestLib::run_log($cmd);
ok($result, "@$cmd exit code 0");
- my $log = TestLib::slurp_file($self->logfile);
+ my $log = TestLib::slurp_file($self->logfile, $log_location);
like($log, $expected_sql, "$test_name: SQL found in server log");
return;
}