index acaade8d812ee2f9d7e8ebfe2ed459c4824c6faf..bc39abd23e4fe11a9b156e51a6323dd7ebb2d389 100644 (file)
$node->psql('postgres', 'SELECT 1/0');
-my $current_logfiles = slurp_file($node->data_dir . '/current_logfiles');
+# might need to retry if logging collector process is slow...
+my $max_attempts = 180 * 10;
+
+my $current_logfiles;
+for (my $attempts = 0; $attempts < $max_attempts; $attempts++)
+{
+ eval {
+ $current_logfiles = slurp_file($node->data_dir . '/current_logfiles');
+ };
+ last unless $@;
+ usleep(100_000);
+}
+die $@ if $@;
note "current_logfiles = $current_logfiles";
$lfname =~ s/^stderr //;
chomp $lfname;
-# might need to retry if logging collector process is slow...
-my $max_attempts = 180 * 10;
-
my $first_logfile;
for (my $attempts = 0; $attempts < $max_attempts; $attempts++)
{