This is an automated email from the ASF dual-hosted git repository.

markt-asf pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
     new 013fa14f81 Fix broken test
013fa14f81 is described below

commit 013fa14f81def3256802991f7c73904110f44a5f
Author: Mark Thomas <[email protected]>
AuthorDate: Mon Aug 24 08:59:12 2026 +0100

    Fix broken test
---
 test/org/apache/catalina/valves/TestPersistentValveAsync.java | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/test/org/apache/catalina/valves/TestPersistentValveAsync.java 
b/test/org/apache/catalina/valves/TestPersistentValveAsync.java
index a29a9ba11c..8429800960 100644
--- a/test/org/apache/catalina/valves/TestPersistentValveAsync.java
+++ b/test/org/apache/catalina/valves/TestPersistentValveAsync.java
@@ -26,6 +26,8 @@ import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.atomic.AtomicReference;
+import java.util.concurrent.locks.ReadWriteLock;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
 
 import jakarta.servlet.AsyncContext;
 import jakarta.servlet.ServletException;
@@ -560,5 +562,11 @@ public class TestPersistentValveAsync extends 
TomcatBaseTest {
             sessions.put(session.getId(), session);
             savedIds.add(session.getId());
         }
+
+        @Override
+        public ReadWriteLock getSessionStoreLock(String sessionId) {
+            // Doesn't provide useful locking but sufficient for tests to pass.
+            return new ReentrantReadWriteLock();
+        }
     }
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to