Skip to content

Commit 877ba90

Browse files
committed
Fix test
1 parent f9c8ca7 commit 877ba90

File tree

1 file changed

+6
-1
lines changed
  • instrumentation/spring/spring-webmvc/spring-webmvc-common/testing/src/main/java/io/opentelemetry/instrumentation/spring/webmvc/boot

1 file changed

+6
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,14 @@ void deferredResult() {
161161
assertServerSpan(span, "GET", DEFERRED_RESULT, DEFERRED_RESULT.getStatus());
162162
span.hasNoParent();
163163
},
164+
span ->
165+
assertHandlerSpan(span, "GET", DEFERRED_RESULT).hasParent(trace.getSpan(0)),
166+
// Handler method runs once for the initial request and again for the async
167+
// redispatch when DeferredResult completes, so we expect two spans with the
168+
// same name.
164169
span ->
165170
assertHandlerSpan(span, "GET", DEFERRED_RESULT)
166-
.hasParent(trace.getSpan(0))),
171+
.hasParent(trace.getSpan(1))),
167172
trace ->
168173
trace.hasSpansSatisfyingExactly(
169174
span ->

0 commit comments

Comments
 (0)