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

Commit87b2124

Browse files
committed
Add more debugging information with log checks in TAP tests of pgbench
fairywren is not happy with the pattern checks introduced byc13585f.I am not sure if this outlines a bug in pgbench or if the regex patternsused in the tests are too restrictive for this buildfarm member'senvironment. This adds more debugging information to show the logentries that do not match with the expected pattern, to help in findingout what's happening. That seems like a good addition in the long-termanyway as that may not be the only issue in this area.Discussion:https://postgr.es/m/YNUad2HvgW+6eXyo@paquier.xyz
1 parent797b0fc commit87b2124

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

‎src/bin/pgbench/t/001_pgbench_with_server.pl

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1199,8 +1199,18 @@ sub check_pgbench_logs
11991199
my$clen =@contents;
12001200
ok($min <=$clen &&$clen <=$max,
12011201
"transaction count for$log ($clen)");
1202-
ok(grep(/$re/,@contents) ==$clen,
1203-
"transaction format for$prefix");
1202+
my$clen_match =grep(/$re/,@contents);
1203+
ok($clen_match ==$clen,"transaction format for$prefix");
1204+
# Show more information if some logs don't match
1205+
# to help with debugging.
1206+
if ($clen_match !=$clen)
1207+
{
1208+
foreachmy$log (@contents)
1209+
{
1210+
print"# Log entry not matching:$log\n"
1211+
unless$log =~/$re/;
1212+
}
1213+
}
12041214
close$fhordie"$@";
12051215
};
12061216
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp