Browse Source

Fix failing test

pull/1111/head
Rossen Stoyanchev 10 years ago
parent
commit
9c438a8f78
  1. 8
      spring-web-reactive/src/test/java/org/springframework/web/reactive/DispatcherHandlerErrorTests.java

8
spring-web-reactive/src/test/java/org/springframework/web/reactive/DispatcherHandlerErrorTests.java

@ -17,6 +17,7 @@ @@ -17,6 +17,7 @@
package org.springframework.web.reactive;
import java.net.URI;
import java.time.Duration;
import java.util.Collections;
import org.junit.Before;
@ -171,12 +172,9 @@ public class DispatcherHandlerErrorTests { @@ -171,12 +172,9 @@ public class DispatcherHandlerErrorTests {
WebExceptionHandler exceptionHandler = new ServerError500ExceptionHandler();
WebHandler webHandler = new ExceptionHandlingWebHandler(this.dispatcherHandler, exceptionHandler);
Mono<Void> publisher = webHandler.handle(this.exchange);
TestSubscriber.subscribe(publisher)
.assertErrorWith(ex -> assertEquals(
HttpStatus.INTERNAL_SERVER_ERROR, this.exchange.getResponse().getStatusCode()));
webHandler.handle(this.exchange).block(Duration.ofSeconds(5));
assertEquals(HttpStatus.INTERNAL_SERVER_ERROR, this.exchange.getResponse().getStatusCode());
}

Loading…
Cancel
Save