webflux test: use the same exception as other tests (#13400)
This commit is contained in:
parent
67b014fbb7
commit
2450a4b9aa
|
@ -41,7 +41,6 @@ public final class SpringWebfluxServerInstrumentationTest
|
|||
protected void configure(HttpServerTestOptions options) {
|
||||
options.setContextPath(CONTEXT_PATH);
|
||||
options.setTestPathParam(true);
|
||||
options.setExpectedException(new RuntimeException(ServerEndpoint.EXCEPTION.getBody()));
|
||||
|
||||
options.setExpectedHttpRoute(
|
||||
(endpoint, method) -> {
|
||||
|
|
|
@ -97,12 +97,12 @@ class TestWebfluxSpringBootApp {
|
|||
}
|
||||
|
||||
@RequestMapping("/exception")
|
||||
Flux<ResponseEntity<String>> exception() throws Exception {
|
||||
Flux<ResponseEntity<String>> exception() {
|
||||
return Flux.just(
|
||||
controller(
|
||||
EXCEPTION,
|
||||
() -> {
|
||||
throw new RuntimeException(EXCEPTION.getBody());
|
||||
throw new IllegalStateException(EXCEPTION.getBody());
|
||||
}));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue