Skip to content

Commit

Permalink
AWS, Core: Slim down Jetty config for tests (#10945)
Browse files Browse the repository at this point in the history
  • Loading branch information
nastra authored Aug 15, 2024
1 parent 3cd2c52 commit 9f12cf9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,8 @@ private static Server initHttpServer() throws Exception {
new S3SignerServlet(S3ObjectMapper.mapper(), ImmutableList.of(deleteObjectsWithBody));
ServletContextHandler servletContext =
new ServletContextHandler(ServletContextHandler.NO_SESSIONS);
servletContext.setContextPath("/");
ServletHolder servletHolder = new ServletHolder(servlet);
servletHolder.setInitParameter("javax.ws.rs.Application", "ServiceListPublic");
servletContext.addServlet(servletHolder, "/*");
servletContext.setVirtualHosts(null);
servletContext.setGzipHandler(new GzipHandler());
servletContext.addServlet(new ServletHolder(servlet), "/*");
servletContext.setHandler(new GzipHandler());

Server server = new Server(0);
server.setHandler(servletContext);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,15 +155,10 @@ public <T extends RESTResponse> T execute(
}
};

RESTCatalogServlet servlet = new RESTCatalogServlet(adaptor);
ServletContextHandler servletContext =
new ServletContextHandler(ServletContextHandler.NO_SESSIONS);
servletContext.setContextPath("/");
ServletHolder servletHolder = new ServletHolder(servlet);
servletHolder.setInitParameter("javax.ws.rs.Application", "ServiceListPublic");
servletContext.addServlet(servletHolder, "/*");
servletContext.setVirtualHosts(null);
servletContext.setGzipHandler(new GzipHandler());
servletContext.addServlet(new ServletHolder(new RESTCatalogServlet(adaptor)), "/*");
servletContext.setHandler(new GzipHandler());

this.httpServer = new Server(0);
httpServer.setHandler(servletContext);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,11 @@ public <T extends RESTResponse> T execute(
}
};

RESTCatalogServlet servlet = new RESTCatalogServlet(adaptor);
ServletContextHandler servletContext =
new ServletContextHandler(ServletContextHandler.NO_SESSIONS);
servletContext.setContextPath("/");
ServletHolder servletHolder = new ServletHolder(servlet);
servletHolder.setInitParameter("javax.ws.rs.Application", "ServiceListPublic");
servletContext.addServlet(servletHolder, "/*");
servletContext.setVirtualHosts(null);
servletContext.setGzipHandler(new GzipHandler());
servletContext.addServlet(new ServletHolder(new RESTCatalogServlet(adaptor)), "/*");
servletContext.setHandler(new GzipHandler());

this.httpServer = new Server(0);
httpServer.setHandler(servletContext);
Expand Down

0 comments on commit 9f12cf9

Please sign in to comment.