added logging to test

This commit is contained in:
Ryan Baxter
2017-02-20 11:18:31 -05:00
parent 0abf69dc1d
commit 72f1ce9096

View File

@@ -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<String> 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<String> 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());
}