Skip to content

Commit

Permalink
Fix test on Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
markt-asf committed Dec 5, 2024
1 parent dda5fee commit fc67ca9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/org/apache/catalina/valves/TestJDBCAccessLogValve.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import org.junit.runners.Parameterized.Parameter;

import org.apache.catalina.Context;
import org.apache.catalina.startup.SimpleHttpClient;
import org.apache.catalina.startup.Tomcat;
import org.apache.catalina.startup.TomcatBaseTest;
import org.apache.tomcat.util.buf.ByteChunk;
Expand Down Expand Up @@ -134,7 +135,11 @@ public void verify() throws Exception {
Assert.assertTrue(rs.next());
Assert.assertEquals(HttpServletResponse.SC_OK, rs.getInt("status"));
Assert.assertEquals("/test/index.html", rs.getString("query"));
Assert.assertTrue(rs.getLong("bytes") == 934);
if (System.lineSeparator().equals(SimpleHttpClient.CRLF)) {
Assert.assertEquals(957, rs.getLong("bytes"));
} else {
Assert.assertEquals(934, rs.getLong("bytes"));
}
Assert.assertTrue(rs.next());
Assert.assertEquals(HttpServletResponse.SC_OK, rs.getInt("status"));
Assert.assertEquals("/test/404.html", rs.getString("query"));
Expand Down

0 comments on commit fc67ca9

Please sign in to comment.