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

Commitc015ccb

Browse files
committed
Make PostgresNode.pm's poll_query_until() more chatty about failures.
Reporting only the stderr is unhelpful when the problem is that theserver output we're getting doesn't match what was expected. So weshould report the query output too; and just for good measure, let'sprint the query we used and the output we expected.Back-patch to 9.5 where poll_query_until was introduced.Discussion:https://postgr.es/m/17913.1539634756@sss.pgh.pa.us
1 parent17d6a8f commitc015ccb

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

‎src/test/perl/PostgresNode.pm

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1369,9 +1369,18 @@ sub poll_query_until
13691369
$attempts++;
13701370
}
13711371

1372-
# The query result didn't change in 180 seconds. Give up. Print the stderr
1373-
# from the last attempt, hopefully that's useful for debugging.
1374-
diag$stderr;
1372+
# The query result didn't change in 180 seconds. Give up. Print the
1373+
# output from the last attempt, hopefully that's useful for debugging.
1374+
chomp($stderr);
1375+
$stderr =~s/\r//gif$TestLib::windows_os;
1376+
diagqq(poll_query_until timed out executing this query:
1377+
$query
1378+
expecting this output:
1379+
$expected
1380+
last actual query output:
1381+
$stdout
1382+
with stderr:
1383+
$stderr);
13751384
return 0;
13761385
}
13771386

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp