Skip to content

Commit 63672f0

Browse files
committed
Wait until we have 6 items AND a transaction
1 parent 11455c9 commit 63672f0

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

inferred-spans/src/test/java/io/opentelemetry/contrib/inferredspans/internal/SamplingProfilerTest.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,12 @@ void testProfileTransaction() throws Exception {
188188
await()
189189
.pollDelay(Duration.ofMillis(10))
190190
.timeout(Duration.ofSeconds(5))
191-
.untilAsserted(() -> assertThat(setup.getSpans()).hasSizeGreaterThanOrEqualTo(6));
191+
.untilAsserted(
192+
() -> {
193+
assertThat(setup.getSpans()).hasSizeGreaterThanOrEqualTo(6);
194+
assertThat(setup.getSpans())
195+
.anySatisfy(span -> assertThat(span.getName()).isEqualTo("transaction"));
196+
});
192197

193198
assertThat(profilingActiveOnThread).isTrue();
194199

0 commit comments

Comments
 (0)