From 84e3ad342b37afbaf9fa88d6116737830f1a857a Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Tue, 29 Dec 2015 17:15:18 -0500 Subject: [PATCH] Remove @Ignore from 404 status code tests --- .../handler/SimpleUrlHandlerMappingIntegrationTests.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/spring-web-reactive/src/test/java/org/springframework/web/reactive/handler/SimpleUrlHandlerMappingIntegrationTests.java b/spring-web-reactive/src/test/java/org/springframework/web/reactive/handler/SimpleUrlHandlerMappingIntegrationTests.java index 0cc303e0c9..d0de9544d0 100644 --- a/spring-web-reactive/src/test/java/org/springframework/web/reactive/handler/SimpleUrlHandlerMappingIntegrationTests.java +++ b/spring-web-reactive/src/test/java/org/springframework/web/reactive/handler/SimpleUrlHandlerMappingIntegrationTests.java @@ -21,7 +21,6 @@ import java.nio.charset.Charset; import java.util.HashMap; import java.util.Map; -import org.junit.Ignore; import org.junit.Test; import org.reactivestreams.Publisher; import reactor.io.buffer.Buffer; @@ -32,12 +31,14 @@ import org.springframework.http.HttpStatus; import org.springframework.http.RequestEntity; import org.springframework.http.ResponseEntity; import org.springframework.http.server.reactive.AbstractHttpHandlerIntegrationTests; +import org.springframework.http.server.reactive.ErrorHandlingHttpHandler; import org.springframework.http.server.reactive.HttpHandler; import org.springframework.http.server.reactive.ServerHttpRequest; import org.springframework.http.server.reactive.ServerHttpResponse; import org.springframework.web.client.HttpClientErrorException; import org.springframework.web.client.RestTemplate; import org.springframework.web.reactive.DispatcherHandler; +import org.springframework.web.reactive.ResponseStatusExceptionHandler; import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; @@ -62,7 +63,7 @@ public class SimpleUrlHandlerMappingIntegrationTests extends AbstractHttpHandler DispatcherHandler dispatcherHandler = new DispatcherHandler(); dispatcherHandler.setApplicationContext(wac); - return dispatcherHandler; + return new ErrorHandlingHttpHandler(dispatcherHandler, new ResponseStatusExceptionHandler()); } @Test @@ -91,10 +92,7 @@ public class SimpleUrlHandlerMappingIntegrationTests extends AbstractHttpHandler assertArrayEquals("bar".getBytes(UTF_8), response.getBody()); } - // TODO: remove @Ignore after 404 default handling - @Test - @Ignore public void testNotFound() throws Exception { RestTemplate restTemplate = new RestTemplate();