Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9a02dbd

Browse files
committed
Retry initial slurp_file("current_logfiles"), in test 004_logrotate.pl.
Buildfarm member topminnow failed when the test script attempted thisbefore the syslogger would have created the file. Back-patch to v12,which introduced the test.
1 parentf5de090 commit9a02dbd

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

‎src/bin/pg_ctl/t/004_logrotate.pl

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,19 @@
2121

2222
$node->psql('postgres','SELECT 1/0');
2323

24-
my$current_logfiles = slurp_file($node->data_dir .'/current_logfiles');
24+
# might need to retry if logging collector process is slow...
25+
my$max_attempts = 180 * 10;
26+
27+
my$current_logfiles;
28+
for (my$attempts = 0;$attempts <$max_attempts;$attempts++)
29+
{
30+
eval {
31+
$current_logfiles = slurp_file($node->data_dir .'/current_logfiles');
32+
};
33+
lastunless$@;
34+
usleep(100_000);
35+
}
36+
die$@if$@;
2537

2638
note"current_logfiles =$current_logfiles";
2739

@@ -34,9 +46,6 @@
3446
$lfname =~s/^stderr//;
3547
chomp$lfname;
3648

37-
# might need to retry if logging collector process is slow...
38-
my$max_attempts = 180 * 10;
39-
4049
my$first_logfile;
4150
for (my$attempts = 0;$attempts <$max_attempts;$attempts++)
4251
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp