|
5 | 5 |
|
6 | 6 | package io.opentelemetry.javaagent.instrumentation.spring.webflux.v5_0.server.base; |
7 | 7 |
|
8 | | -import static org.assertj.core.api.Assertions.assertThat; |
9 | | -import static org.junit.jupiter.api.Assumptions.assumeTrue; |
10 | | - |
| 8 | +import io.opentelemetry.instrumentation.spring.webflux.server.AbstractImmediateHandlerSpringWebFluxServerTest; |
11 | 9 | import io.opentelemetry.instrumentation.testing.junit.http.ServerEndpoint; |
12 | | -import io.opentelemetry.testing.internal.armeria.common.AggregatedHttpRequest; |
13 | | -import io.opentelemetry.testing.internal.armeria.common.AggregatedHttpResponse; |
14 | | -import org.junit.jupiter.api.Test; |
15 | 10 | import org.springframework.boot.autoconfigure.EnableAutoConfiguration; |
16 | 11 | import org.springframework.boot.web.embedded.netty.NettyReactiveWebServerFactory; |
17 | 12 | import org.springframework.context.annotation.Bean; |
|
20 | 15 | import org.springframework.web.reactive.function.server.ServerResponse; |
21 | 16 | import reactor.core.publisher.Mono; |
22 | 17 |
|
23 | | -/** |
24 | | - * Tests the case where "controller" span is created within the route handler method scope, and the |
25 | | - * |
26 | | - * <p>{@code Mono<ServerResponse>} from a handler is already a fully constructed response with no |
27 | | - * deferred actions. For exception endpoint, the exception is thrown within route handler method |
28 | | - * scope. |
29 | | - */ |
30 | | -class ImmediateHandlerSpringWebFluxServerTest extends HandlerSpringWebFluxServerTest { |
| 18 | +class ImmediateHandlerSpringWebFluxServerTest |
| 19 | + extends AbstractImmediateHandlerSpringWebFluxServerTest { |
31 | 20 | @Override |
32 | 21 | protected Class<?> getApplicationClass() { |
33 | 22 | return Application.class; |
@@ -60,18 +49,4 @@ protected Mono<ServerResponse> wrapResponse( |
60 | 49 | }); |
61 | 50 | } |
62 | 51 | } |
63 | | - |
64 | | - @Test |
65 | | - void nestedPath() { |
66 | | - assumeTrue(Boolean.getBoolean("testLatestDeps")); |
67 | | - |
68 | | - String method = "GET"; |
69 | | - AggregatedHttpRequest request = request(NESTED_PATH, method); |
70 | | - AggregatedHttpResponse response = client.execute(request).aggregate().join(); |
71 | | - assertThat(response.status().code()).isEqualTo(NESTED_PATH.getStatus()); |
72 | | - assertThat(response.contentUtf8()).isEqualTo(NESTED_PATH.getBody()); |
73 | | - assertResponseHasCustomizedHeaders(response, NESTED_PATH, null); |
74 | | - |
75 | | - assertTheTraces(1, null, null, null, method, NESTED_PATH); |
76 | | - } |
77 | 52 | } |
0 commit comments