Fix flaky executor test (#9593)
This commit is contained in:
parent
6e97851a0b
commit
fa195d8771
|
@ -6,6 +6,7 @@
|
||||||
package io.opentelemetry.javaagent.instrumentation.executors;
|
package io.opentelemetry.javaagent.instrumentation.executors;
|
||||||
|
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
|
import static org.awaitility.Awaitility.await;
|
||||||
|
|
||||||
import io.opentelemetry.api.baggage.Baggage;
|
import io.opentelemetry.api.baggage.Baggage;
|
||||||
import io.opentelemetry.context.Scope;
|
import io.opentelemetry.context.Scope;
|
||||||
|
@ -32,7 +33,7 @@ class ThreadPoolExecutorTest {
|
||||||
latch.await(10, TimeUnit.SECONDS);
|
latch.await(10, TimeUnit.SECONDS);
|
||||||
|
|
||||||
assertThat(executor.sameTaskBefore).isTrue();
|
assertThat(executor.sameTaskBefore).isTrue();
|
||||||
assertThat(executor.sameTaskAfter).isTrue();
|
await().untilAsserted(() -> assertThat(executor.sameTaskAfter).isTrue());
|
||||||
}
|
}
|
||||||
|
|
||||||
// class is configured to be instrumented via otel.instrumentation.executors.include
|
// class is configured to be instrumented via otel.instrumentation.executors.include
|
||||||
|
|
Loading…
Reference in New Issue