This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new f7570aec34 Further robustness changes to address Gump failures
f7570aec34 is described below
commit f7570aec34b44329839ee26d4fff910e98a5b6e0
Author: Mark Thomas <[email protected]>
AuthorDate: Wed Mar 19 04:48:36 2025 +0000
Further robustness changes to address Gump failures
---
.../apache/catalina/valves/TestExtendedAccessLogValve.java | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/test/org/apache/catalina/valves/TestExtendedAccessLogValve.java
b/test/org/apache/catalina/valves/TestExtendedAccessLogValve.java
index 439c397a0e..08a379f559 100644
--- a/test/org/apache/catalina/valves/TestExtendedAccessLogValve.java
+++ b/test/org/apache/catalina/valves/TestExtendedAccessLogValve.java
@@ -149,7 +149,7 @@ public class TestExtendedAccessLogValve extends
TomcatBaseTest {
long startWait = System.currentTimeMillis();
String content = writer.toString();
- while ("".equals(content) && System.currentTimeMillis() - startWait <
SLEEP_MAX) {
+ while (countLogLines(content) == 0 && System.currentTimeMillis() -
startWait < SLEEP_MAX) {
try {
Thread.sleep(SLEEP);
} catch (InterruptedException ex) {
@@ -162,6 +162,18 @@ public class TestExtendedAccessLogValve extends
TomcatBaseTest {
}
+ private int countLogLines(String content) {
+ int result = 0;
+ String[] lines = content.split("\\r?\\n");
+ for (String line : lines) {
+ if (!line.startsWith("#") && !line.trim().isEmpty()) {
+ result++;
+ }
+ }
+ return result;
+ }
+
+
private void processLogContent(String content) {
String[] lines = content.split("\\r?\\n");
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]