File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
src/main/java/co/elastic/apm/agent/benchmark Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 4242 <artifactId >javax.servlet-api</artifactId >
4343 <version >3.0.1</version >
4444 </dependency >
45+ <dependency >
46+ <groupId >org.springframework</groupId >
47+ <artifactId >spring-test</artifactId >
48+ <version >${version.spring} </version >
49+ </dependency >
4550 <dependency >
4651 <groupId >com.h2database</groupId >
4752 <artifactId >h2</artifactId >
Original file line number Diff line number Diff line change 1919 */
2020package co .elastic .apm .agent .benchmark ;
2121
22+ import org .springframework .mock .web .MockServletContext ;
23+
2224import javax .servlet .AsyncContext ;
2325import javax .servlet .DispatcherType ;
2426import javax .servlet .RequestDispatcher ;
@@ -56,6 +58,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
5658 private String requestURI ;
5759 private String servletPath ;
5860 private String serverName ;
61+ private MockServletContext servletContext = new MockServletContext ();
5962
6063 public MockHttpServletRequest (String method , String requestUrl ) {
6164 this .method = method ;
@@ -372,7 +375,7 @@ public int getLocalPort() {
372375
373376 @ Override
374377 public ServletContext getServletContext () {
375- return null ;
378+ return servletContext ;
376379 }
377380
378381 @ Override
You can’t perform that action at this time.
0 commit comments