Commit 8a116200 authored by Phillip Webb's avatar Phillip Webb

Fix failing test due to SPR-14093

parent 09124505
...@@ -68,6 +68,7 @@ import org.springframework.context.annotation.Bean; ...@@ -68,6 +68,7 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import; import org.springframework.context.annotation.Import;
import org.springframework.http.HttpMethod; import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
import org.springframework.http.client.ClientHttpRequest; import org.springframework.http.client.ClientHttpRequest;
import org.springframework.http.client.ClientHttpResponse; import org.springframework.http.client.ClientHttpResponse;
import org.springframework.http.client.SimpleClientHttpRequestFactory; import org.springframework.http.client.SimpleClientHttpRequestFactory;
...@@ -496,6 +497,9 @@ public class EndpointWebMvcAutoConfigurationTests { ...@@ -496,6 +497,9 @@ public class EndpointWebMvcAutoConfigurationTests {
.createRequest(new URI("http://localhost:" + port + url), HttpMethod.GET); .createRequest(new URI("http://localhost:" + port + url), HttpMethod.GET);
try { try {
ClientHttpResponse response = request.execute(); ClientHttpResponse response = request.execute();
if (HttpStatus.NOT_FOUND.equals(response.getStatusCode())) {
throw new FileNotFoundException();
}
try { try {
String actual = StreamUtils.copyToString(response.getBody(), String actual = StreamUtils.copyToString(response.getBody(),
Charset.forName("UTF-8")); Charset.forName("UTF-8"));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment