Skip to content

Commit d424be3

Browse files
committed
Passing latest dep test
1 parent eca9842 commit d424be3

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

instrumentation/spring/spring-webmvc/spring-webmvc-common/testing/src/main/java/io/opentelemetry/instrumentation/spring/webmvc/boot/AbstractSpringBootBasedTest.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
import java.util.Locale;
4343
import java.util.function.Consumer;
4444
import org.junit.jupiter.api.Test;
45+
import org.junit.jupiter.api.condition.EnabledIfSystemProperty;
4546
import org.junit.jupiter.params.ParameterizedTest;
4647
import org.junit.jupiter.params.provider.ValueSource;
4748
import org.springframework.context.ConfigurableApplicationContext;
@@ -146,6 +147,7 @@ void testCharacterEncodingOfTestPassword(String testPassword) {
146147
}
147148

148149
@Test
150+
@EnabledIfSystemProperty(named = "testLatestDeps", matches = "true")
149151
void deferredResult() {
150152
AggregatedHttpResponse response =
151153
client.execute(request(DEFERRED_RESULT, "GET")).aggregate().join();
@@ -163,19 +165,17 @@ void deferredResult() {
163165
},
164166
span ->
165167
assertHandlerSpan(span, "GET", DEFERRED_RESULT).hasParent(trace.getSpan(0)),
168+
span ->
169+
span.hasName("deferred-result-child")
170+
.hasKind(SpanKind.INTERNAL)
171+
.hasParent(trace.getSpan(1))
172+
.hasTotalAttributeCount(0),
166173
// Handler method runs once for the initial request and again for the async
167174
// redispatch when DeferredResult completes, so we expect two spans with the
168-
// same name.
175+
// same name. The second handler span is parented to the async child span.
169176
span ->
170177
assertHandlerSpan(span, "GET", DEFERRED_RESULT)
171-
.hasParent(trace.getSpan(1))),
172-
trace ->
173-
trace.hasSpansSatisfyingExactly(
174-
span ->
175-
span.hasName("deferred-result-child")
176-
.hasKind(SpanKind.INTERNAL)
177-
.hasNoParent()
178-
.hasTotalAttributeCount(0)));
178+
.hasParent(trace.getSpan(2))));
179179
}
180180

181181
@Override

javaagent-tooling/src/main/java/io/opentelemetry/javaagent/tooling/ignore/AdditionalLibraryIgnoredTypesConfigurer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public void configure(IgnoredTypesBuilder builder) {
5353

5454
builder
5555
.ignoreClass("org.springframework.aop.")
56-
.allowClass("org.springframework.aop.interceptor.AsyncExecutionInterceptor$1")
56+
.allowClass("org.springframework.aop.interceptor.AsyncExecutionInterceptor$")
5757
.ignoreClass("org.springframework.cache.")
5858
.ignoreClass("org.springframework.dao.")
5959
.ignoreClass("org.springframework.ejb.")

0 commit comments

Comments
 (0)