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 f403fb27aa Fix broken performance test
f403fb27aa is described below
commit f403fb27aae81450f8f15cf9d3bab72c2cb031de
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]