Skip to content

Commit 2450a4b

Browse files
authored
webflux test: use the same exception as other tests (#13400)
1 parent 67b014f commit 2450a4b

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

instrumentation/spring/spring-webflux/spring-webflux-5.3/library/src/test/java/io/opentelemetry/instrumentation/spring/webflux/v5_3/SpringWebfluxServerInstrumentationTest.java

-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ public void stopServer(ConfigurableApplicationContext applicationContext) {
4141
protected void configure(HttpServerTestOptions options) {
4242
options.setContextPath(CONTEXT_PATH);
4343
options.setTestPathParam(true);
44-
options.setExpectedException(new RuntimeException(ServerEndpoint.EXCEPTION.getBody()));
4544

4645
options.setExpectedHttpRoute(
4746
(endpoint, method) -> {

instrumentation/spring/spring-webflux/spring-webflux-5.3/library/src/test/java/io/opentelemetry/instrumentation/spring/webflux/v5_3/TestWebfluxSpringBootApp.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,12 @@ Mono<ResponseEntity<String>> error() {
9797
}
9898

9999
@RequestMapping("/exception")
100-
Flux<ResponseEntity<String>> exception() throws Exception {
100+
Flux<ResponseEntity<String>> exception() {
101101
return Flux.just(
102102
controller(
103103
EXCEPTION,
104104
() -> {
105-
throw new RuntimeException(EXCEPTION.getBody());
105+
throw new IllegalStateException(EXCEPTION.getBody());
106106
}));
107107
}
108108

0 commit comments

Comments
 (0)