webflux test: use the same exception as other tests (#13400)

This commit is contained in:
Lauri Tulmin 2025-02-26 19:55:24 +02:00 committed by GitHub
parent 67b014fbb7
commit 2450a4b9aa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 3 deletions

View File

@ -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) -> {

View File

@ -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());
}));
}