diff --git a/aws-serverless-java-container-jersey/src/test/java/com/amazonaws/serverless/proxy/jersey/EchoJerseyResource.java b/aws-serverless-java-container-jersey/src/test/java/com/amazonaws/serverless/proxy/jersey/EchoJerseyResource.java index ec0f4b2ac..5da93ca08 100644 --- a/aws-serverless-java-container-jersey/src/test/java/com/amazonaws/serverless/proxy/jersey/EchoJerseyResource.java +++ b/aws-serverless-java-container-jersey/src/test/java/com/amazonaws/serverless/proxy/jersey/EchoJerseyResource.java @@ -86,7 +86,6 @@ public SingleValueModel returnFilterAttribute(@Context HttpServletRequest req) { @Path("/list-query-string") @GET @Produces(MediaType.APPLICATION_JSON) public SingleValueModel echoQueryStringLength(@QueryParam("list") List param) { - System.out.println("param: " + param + " = " + param.size()); SingleValueModel model = new SingleValueModel(); model.setValue(param.size() + ""); return model; @@ -157,7 +156,6 @@ public MapResponseModel echoQueryString(@Context UriInfo context) { @Produces(MediaType.APPLICATION_JSON) public SingleValueModel echoRequestScheme(@Context UriInfo context) { SingleValueModel model = new SingleValueModel(); - System.out.println("RequestUri: " + context.getRequestUri().toString()); model.setValue(context.getRequestUri().getScheme()); return model; } @@ -261,11 +259,6 @@ public Response fileSize(@FormDataParam("file") final File uploadedFile, @Context ContainerRequestContext req) { SingleValueModel sv = new SingleValueModel(); - System.out.println( - "Is base64 encoded: " + - ((AwsProxyHttpServletRequest)req.getProperty(JERSEY_SERVLET_REQUEST_PROPERTY)).getAwsProxyRequest().isBase64Encoded() - ); - try { InputStream fileIs = new FileInputStream(uploadedFile); System.out.println("File: " + fileDetail.getName() + " " + fileDetail.getFileName() + " " + fileDetail.getSize()); diff --git a/aws-serverless-java-container-jersey/src/test/java/com/amazonaws/serverless/proxy/jersey/JerseyAwsProxyTest.java b/aws-serverless-java-container-jersey/src/test/java/com/amazonaws/serverless/proxy/jersey/JerseyAwsProxyTest.java index e791ae810..baecb13aa 100644 --- a/aws-serverless-java-container-jersey/src/test/java/com/amazonaws/serverless/proxy/jersey/JerseyAwsProxyTest.java +++ b/aws-serverless-java-container-jersey/src/test/java/com/amazonaws/serverless/proxy/jersey/JerseyAwsProxyTest.java @@ -110,7 +110,6 @@ public void alb_basicRequest_expectSuccess() { assertEquals(200, output.getStatusCode()); assertEquals("application/json", output.getMultiValueHeaders().getFirst("Content-Type")); assertNotNull(output.getStatusDescription()); - System.out.println(output.getStatusDescription()); validateMapResponseModel(output); } @@ -170,9 +169,6 @@ public void context_servletResponse_setCustomHeader() { public void context_serverInfo_correctContext() { AwsProxyRequest request = getRequestBuilder("/echo/servlet-context", "GET").build(); AwsProxyResponse output = handler.proxy(request, lambdaContext); - for (String header : output.getMultiValueHeaders().keySet()) { - System.out.println(header + ": " + output.getMultiValueHeaders().getFirst(header)); - } assertEquals(200, output.getStatusCode()); assertEquals("application/json", output.getMultiValueHeaders().getFirst("Content-Type")); diff --git a/aws-serverless-java-container-jersey/src/test/java/com/amazonaws/serverless/proxy/jersey/JerseyParamEncodingTest.java b/aws-serverless-java-container-jersey/src/test/java/com/amazonaws/serverless/proxy/jersey/JerseyParamEncodingTest.java index 06edbdaab..0484e62d9 100644 --- a/aws-serverless-java-container-jersey/src/test/java/com/amazonaws/serverless/proxy/jersey/JerseyParamEncodingTest.java +++ b/aws-serverless-java-container-jersey/src/test/java/com/amazonaws/serverless/proxy/jersey/JerseyParamEncodingTest.java @@ -187,7 +187,6 @@ public void queryParam_encoding_expectFullyEncodedUrl() { assertNotNull(resp); assertEquals(resp.getStatusCode(), 200); validateSingleValueModel(resp, "%2F%2B%3D"); - System.out.println("body:" + resp.getBody()); } @Test diff --git a/aws-serverless-java-container-jersey/src/test/java/com/amazonaws/serverless/proxy/jersey/providers/CustomExceptionMapper.java b/aws-serverless-java-container-jersey/src/test/java/com/amazonaws/serverless/proxy/jersey/providers/CustomExceptionMapper.java index a800d114b..e435aff96 100644 --- a/aws-serverless-java-container-jersey/src/test/java/com/amazonaws/serverless/proxy/jersey/providers/CustomExceptionMapper.java +++ b/aws-serverless-java-container-jersey/src/test/java/com/amazonaws/serverless/proxy/jersey/providers/CustomExceptionMapper.java @@ -12,7 +12,7 @@ public class CustomExceptionMapper implements ExceptionMapper { public CustomExceptionMapper() { - System.out.println("Starting custom exception mapper"); + } @Inject @@ -23,7 +23,6 @@ public Response toResponse(UnsupportedOperationException throwable) { if (request == null) { return Response.status(Response.Status.NOT_FOUND).build(); } else { - System.out.println("Request uri: " + request.get().getRequestURI()); return Response.ok(throwable.getMessage()).status(Response.Status.NOT_IMPLEMENTED).build(); } } diff --git a/aws-serverless-java-container-spark/src/test/java/com/amazonaws/serverless/proxy/spark/InitExceptionHandlerTest.java b/aws-serverless-java-container-spark/src/test/java/com/amazonaws/serverless/proxy/spark/InitExceptionHandlerTest.java index fb39d9b69..6042899e4 100644 --- a/aws-serverless-java-container-spark/src/test/java/com/amazonaws/serverless/proxy/spark/InitExceptionHandlerTest.java +++ b/aws-serverless-java-container-spark/src/test/java/com/amazonaws/serverless/proxy/spark/InitExceptionHandlerTest.java @@ -67,7 +67,6 @@ public static void stopSpark() { private static void configureRoutes() { initExceptionHandler((e) -> { - System.out.println("Exception Handler called: " + e.getLocalizedMessage()); assertEquals(TEST_EXCEPTION_MESSAGE, e.getLocalizedMessage()); }); diff --git a/aws-serverless-java-container-spark/src/test/java/com/amazonaws/serverless/proxy/spark/SparkLambdaContainerHandlerTest.java b/aws-serverless-java-container-spark/src/test/java/com/amazonaws/serverless/proxy/spark/SparkLambdaContainerHandlerTest.java index 400373a40..c778bd57e 100644 --- a/aws-serverless-java-container-spark/src/test/java/com/amazonaws/serverless/proxy/spark/SparkLambdaContainerHandlerTest.java +++ b/aws-serverless-java-container-spark/src/test/java/com/amazonaws/serverless/proxy/spark/SparkLambdaContainerHandlerTest.java @@ -38,7 +38,6 @@ public void filters_onStartupMethod_executeFilters() { handler.onStartup(c -> { if (c == null) { - System.out.println("Null servlet context"); fail(); } FilterRegistration.Dynamic registration = c.addFilter("CustomHeaderFilter", CustomHeaderFilter.class); @@ -75,7 +74,6 @@ public void filters_unauthenticatedFilter_stopRequestProcessing() { handler.onStartup(c -> { if (c == null) { - System.out.println("Null servlet context"); fail(); } FilterRegistration.Dynamic registration = c.addFilter("UnauthenticatedFilter", UnauthenticatedFilter.class); diff --git a/aws-serverless-java-container-spark/src/test/java/com/amazonaws/serverless/proxy/spark/filter/CustomHeaderFilter.java b/aws-serverless-java-container-spark/src/test/java/com/amazonaws/serverless/proxy/spark/filter/CustomHeaderFilter.java index 349994456..e3733f3a9 100644 --- a/aws-serverless-java-container-spark/src/test/java/com/amazonaws/serverless/proxy/spark/filter/CustomHeaderFilter.java +++ b/aws-serverless-java-container-spark/src/test/java/com/amazonaws/serverless/proxy/spark/filter/CustomHeaderFilter.java @@ -18,12 +18,11 @@ public class CustomHeaderFilter implements Filter { @Override public void init(FilterConfig filterConfig) throws ServletException { - System.out.println("Called init on filter"); + } @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { - System.out.println("Called doFilter"); HttpServletResponse resp = (HttpServletResponse)servletResponse; resp.addHeader(HEADER_NAME, HEADER_VALUE); @@ -33,6 +32,6 @@ public void doFilter(ServletRequest servletRequest, ServletResponse servletRespo @Override public void destroy() { - System.out.println("Called destroy"); + } } \ No newline at end of file diff --git a/aws-serverless-java-container-spark/src/test/java/com/amazonaws/serverless/proxy/spark/filter/UnauthenticatedFilter.java b/aws-serverless-java-container-spark/src/test/java/com/amazonaws/serverless/proxy/spark/filter/UnauthenticatedFilter.java index 60e8eb429..742072ca5 100644 --- a/aws-serverless-java-container-spark/src/test/java/com/amazonaws/serverless/proxy/spark/filter/UnauthenticatedFilter.java +++ b/aws-serverless-java-container-spark/src/test/java/com/amazonaws/serverless/proxy/spark/filter/UnauthenticatedFilter.java @@ -27,13 +27,10 @@ public void init(FilterConfig filterConfig) @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { - System.out.println("Running unauth filter"); if (((HttpServletRequest)servletRequest).getHeader(HEADER_NAME) != null) { ((HttpServletResponse) servletResponse).setStatus(401); - System.out.println("Returning 401"); return; } - System.out.println("Continue chain"); filterChain.doFilter(servletRequest, servletResponse); }