Add async test for serverless-web

This commit is contained in:
Oleg Zhurakousky
2023-06-22 17:06:26 +02:00
parent ef222931b8
commit 2ed9675247
3 changed files with 33 additions and 5 deletions

View File

@@ -65,8 +65,6 @@ public final class ProxyMvc {
private static Log LOG = LogFactory.getLog(ProxyMvc.class);
static final String MVC_RESULT_ATTRIBUTE = ProxyMvc.class.getName().concat(".MVC_RESULT_ATTRIBUTE");
private final DispatcherServlet dispatcher;
private final ConfigurableWebApplicationContext applicationContext;
@@ -142,8 +140,6 @@ public final class ProxyMvc {
public void service(HttpServletRequest request, HttpServletResponse response, CountDownLatch latch) throws Exception {
((ProxyHttpServletRequest) request).setAsyncStarted(true);
ProxyFilterChain filterChain = new ProxyFilterChain(this.dispatcher);
filterChain.doFilter(request, response);
@@ -190,7 +186,6 @@ public final class ProxyMvc {
ProxyFilterChain(DispatcherServlet servlet) {
List<Filter> filters = new ArrayList<>();
servlet.getServletContext().getFilterRegistrations().values().forEach(fr -> filters.add(((ProxyFilterRegistration) fr).getFilter()));
//servlet.getWebApplicationContext().getBeansOfType(Filter.class).values().forEach(f -> filters.add(f));
Assert.notNull(filters, "filters cannot be null");
Assert.noNullElements(filters, "filters cannot contain null values");
this.filters = initFilterList(servlet, filters.toArray(new Filter[] {}));