Fix failing test due to SPR-14093

pull/5532/head
Phillip Webb 9 years ago
parent 091245052f
commit 8a11620052

@ -68,6 +68,7 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
import org.springframework.http.client.ClientHttpRequest;
import org.springframework.http.client.ClientHttpResponse;
import org.springframework.http.client.SimpleClientHttpRequestFactory;
@ -496,6 +497,9 @@ public class EndpointWebMvcAutoConfigurationTests {
.createRequest(new URI("http://localhost:" + port + url), HttpMethod.GET);
try {
ClientHttpResponse response = request.execute();
if (HttpStatus.NOT_FOUND.equals(response.getStatusCode())) {
throw new FileNotFoundException();
}
try {
String actual = StreamUtils.copyToString(response.getBody(),
Charset.forName("UTF-8"));

Loading…
Cancel
Save