Skip to content

Commit

Permalink
Fix new unit test: make expected error page size a bit flexible
Browse files Browse the repository at this point in the history
  • Loading branch information
rainerjung committed Apr 27, 2023
1 parent e718646 commit d3f549f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/org/apache/catalina/valves/TestAccessLogValve.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ public static Collection<Object[]> parameters() {
List<Object[]> parameterSets = new ArrayList<>();

parameterSets.add(new Object[] {"common", TEXT_TYPE, "/", "common",
IP_PATTERN + " - - " + DATE_PATTERN + " \"GET / HTTP/1.1\" 404 700"});
IP_PATTERN + " - - " + DATE_PATTERN + " \"GET / HTTP/1.1\" 404 [67]\\d\\d"});
parameterSets.add(new Object[] {"common", JSON_TYPE, "/", "common",
"\\{\"host\":\"" + IP_PATTERN + "\",\"logicalUserName\":\"-\",\"user\":\"-\",\"time\":\"" + DATE_PATTERN +
"\",\"request\":\"GET / HTTP/1.1\",\"statusCode\":\"404\",\"size\":\"700\"\\}"});
"\",\"request\":\"GET / HTTP/1.1\",\"statusCode\":\"404\",\"size\":\"[67]\\d\\d\"\\}"});
parameterSets.add(new Object[] {"combined", TEXT_TYPE, "/", "combined",
IP_PATTERN + " - - " + DATE_PATTERN + " \"GET / HTTP/1.1\" 404 700 \"-\" \"" + UA_PATTERN + "\""});
IP_PATTERN + " - - " + DATE_PATTERN + " \"GET / HTTP/1.1\" 404 [67]\\d\\d \"-\" \"" + UA_PATTERN + "\""});
parameterSets.add(new Object[] {"combined", JSON_TYPE, "/", "combined",
"\\{\"host\":\"" + IP_PATTERN + "\",\"logicalUserName\":\"-\",\"user\":\"-\",\"time\":\"" + DATE_PATTERN +
"\",\"request\":\"GET / HTTP/1.1\",\"statusCode\":\"404\",\"size\":\"700\"" +
"\",\"request\":\"GET / HTTP/1.1\",\"statusCode\":\"404\",\"size\":\"[67]\\d\\d\"" +
",\"requestHeaders\": \\{\"Referer\":\"-\",\"User-Agent\":\"" + UA_PATTERN + "\"\\}\\}"});

return parameterSets;
Expand Down

0 comments on commit d3f549f

Please sign in to comment.