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

Commitc7578fa

Browse files
committed
Fix some failures with connection tests on Windows hosts
The truncation of the log file, that this set of tests relies on to makesure that a connection attempt matches with its expected backend logpattern, fails, as reported by buildfarm member fairywren. Instead of atruncation, do a rotation of the log file and restart the node. Thiswill ensure that the connection attempt data is unique for each test.Discussion:https://postgr.es/m/YG05nCI8x8B+Ad3G@paquier.xyz
1 parente717a9a commitc7578fa

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

‎src/test/perl/PostgresNode.pm

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1920,7 +1920,17 @@ sub connect_ok
19201920
if (@log_likeor@log_unlike)
19211921
{
19221922
# Don't let previous log entries match for this connection.
1923-
truncate$self->logfile, 0;
1923+
# On Windows, the truncation would not work, so rotate the log
1924+
# file before restarting the server afresh.
1925+
if ($TestLib::windows_os)
1926+
{
1927+
$self->rotate_logfile;
1928+
$self->restart;
1929+
}
1930+
else
1931+
{
1932+
truncate$self->logfile, 0;
1933+
}
19241934
}
19251935

19261936
# Never prompt for a password, any callers of this routine should
@@ -1994,7 +2004,17 @@ sub connect_fails
19942004
if (@log_likeor@log_unlike)
19952005
{
19962006
# Don't let previous log entries match for this connection.
1997-
truncate$self->logfile, 0;
2007+
# On Windows, the truncation would not work, so rotate the log
2008+
# file before restarting the server afresh.
2009+
if ($TestLib::windows_os)
2010+
{
2011+
$self->rotate_logfile;
2012+
$self->restart;
2013+
}
2014+
else
2015+
{
2016+
truncate$self->logfile, 0;
2017+
}
19982018
}
19992019

20002020
# Never prompt for a password, any callers of this routine should

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp