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

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


The following commit(s) were added to refs/heads/11.0.x by this push:
     new dc98f50b65 Fix broken performance test
dc98f50b65 is described below

commit dc98f50b650bbe8c2268ca5f6ca3b5e63b47ba80
Author: Mark Thomas <[email protected]>
AuthorDate: Thu Oct 8 10:50:14 2026 +0100

    Fix broken performance test
---
 .../apache/catalina/core/TesterApplicationHttpRequestPerformance.java  | 3 +++
 1 file changed, 3 insertions(+)

diff --git 
a/test/org/apache/catalina/core/TesterApplicationHttpRequestPerformance.java 
b/test/org/apache/catalina/core/TesterApplicationHttpRequestPerformance.java
index 01949c313c..4a3cacb644 100644
--- a/test/org/apache/catalina/core/TesterApplicationHttpRequestPerformance.java
+++ b/test/org/apache/catalina/core/TesterApplicationHttpRequestPerformance.java
@@ -21,6 +21,7 @@ import jakarta.servlet.http.HttpServletRequest;
 import org.junit.Test;
 
 import org.apache.catalina.connector.Request;
+import org.apache.tomcat.unittest.TesterContext;
 
 /*
  * This is an absolute performance test. There is no benefit it running it as 
part of a standard test run so it is
@@ -32,6 +33,7 @@ public class TesterApplicationHttpRequestPerformance {
     public void testGetAttribute() {
         org.apache.coyote.Request coyoteRequest = new 
org.apache.coyote.Request();
         Request request = new Request(null, coyoteRequest);
+        request.getMappingData().context = new TesterContext();
         ApplicationHttpRequest applicationHttpRequest = new 
ApplicationHttpRequest(request, null, false);
 
         // Warm-up
@@ -55,6 +57,7 @@ public class TesterApplicationHttpRequestPerformance {
         if (depth <= 0) {
             org.apache.coyote.Request coyoteRequest = new 
org.apache.coyote.Request();
             Request request = new Request(null, coyoteRequest);
+            request.getMappingData().context = new TesterContext();
             return request;
         }
         return new ApplicationHttpRequest(getRequest(depth - 1), null, false);


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

Reply via email to