From 72f1ce9096ad2b4e3f31a17e1197033c33dda767 Mon Sep 17 00:00:00 2001 From: Ryan Baxter Date: Mon, 20 Feb 2017 11:18:31 -0500 Subject: [PATCH] added logging to test --- .../route/support/RibbonRetryIntegrationTestBase.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/zuul/filters/route/support/RibbonRetryIntegrationTestBase.java b/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/zuul/filters/route/support/RibbonRetryIntegrationTestBase.java index b6d7379b..becfa893 100644 --- a/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/zuul/filters/route/support/RibbonRetryIntegrationTestBase.java +++ b/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/zuul/filters/route/support/RibbonRetryIntegrationTestBase.java @@ -18,6 +18,7 @@ package org.springframework.cloud.netflix.zuul.filters.route.support; +import java.util.logging.Logger; import org.junit.Before; import org.junit.Test; import org.springframework.beans.factory.annotation.Value; @@ -47,6 +48,8 @@ import static org.junit.Assert.assertEquals; */ public abstract class RibbonRetryIntegrationTestBase { + private final Logger LOG = Logger.getLogger(RibbonRetryIntegrationTestBase.class.getName()); + @Value("${local.server.port}") protected int port; @@ -101,6 +104,7 @@ public abstract class RibbonRetryIntegrationTestBase { ResponseEntity result = new TestRestTemplate().exchange( "http://localhost:" + this.port + uri, HttpMethod.GET, new HttpEntity<>((Void) null), String.class); + LOG.info("Response Body: " + result.getBody()); assertEquals(HttpStatus.INTERNAL_SERVER_ERROR, result.getStatusCode()); } @@ -110,6 +114,7 @@ public abstract class RibbonRetryIntegrationTestBase { ResponseEntity result = new TestRestTemplate().exchange( "http://localhost:" + this.port + uri, HttpMethod.GET, new HttpEntity<>((Void) null), String.class); + LOG.info("Response Body: " + result.getBody()); assertEquals(HttpStatus.INTERNAL_SERVER_ERROR, result.getStatusCode()); }