You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2024/12/05 14:38:25 UTC
(tomcat) branch 10.1.x updated: Fix test on Windows.
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.1.x by this push:
new 821c90f4f3 Fix test on Windows.
821c90f4f3 is described below
commit 821c90f4f3526213041bd390c10ba588953eab2e
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu Dec 5 14:37:51 2024 +0000
Fix test on Windows.
---
test/org/apache/catalina/valves/TestJDBCAccessLogValve.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/test/org/apache/catalina/valves/TestJDBCAccessLogValve.java b/test/org/apache/catalina/valves/TestJDBCAccessLogValve.java
index d290f38cc2..689876fe94 100644
--- a/test/org/apache/catalina/valves/TestJDBCAccessLogValve.java
+++ b/test/org/apache/catalina/valves/TestJDBCAccessLogValve.java
@@ -33,6 +33,7 @@ import org.junit.runners.Parameterized;
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;
@@ -134,7 +135,11 @@ public class TestJDBCAccessLogValve extends TomcatBaseTest {
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"));
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org