5
5
6
6
package io .opentelemetry .instrumentation .testing ;
7
7
8
+ import static io .opentelemetry .instrumentation .testing .internal .AwaitUtil .awaitUntilAsserted ;
8
9
import static io .opentelemetry .sdk .testing .assertj .OpenTelemetryAssertions .assertThat ;
9
10
10
11
import io .opentelemetry .api .OpenTelemetry ;
11
- import io .opentelemetry .instrumentation .testing .internal .AwaitUtil ;
12
12
import io .opentelemetry .instrumentation .testing .util .TelemetryDataUtil ;
13
13
import io .opentelemetry .instrumentation .testing .util .ThrowingRunnable ;
14
14
import io .opentelemetry .instrumentation .testing .util .ThrowingSupplier ;
@@ -117,8 +117,7 @@ private <T extends Consumer<TraceAssert>> void waitAndAssertTraces(
117
117
List <T > assertionsList = new ArrayList <>();
118
118
assertions .forEach (assertionsList ::add );
119
119
120
- AwaitUtil .awaitUntilAsserted (
121
- () -> doAssertTraces (traceComparator , assertionsList , verifyScopeVersion ));
120
+ awaitUntilAsserted (() -> doAssertTraces (traceComparator , assertionsList , verifyScopeVersion ));
122
121
}
123
122
124
123
private <T extends Consumer <TraceAssert >> void doAssertTraces (
@@ -142,7 +141,7 @@ private <T extends Consumer<TraceAssert>> void doAssertTraces(
142
141
public final void waitAndAssertMetrics (
143
142
String instrumentationName , String metricName , Consumer <ListAssert <MetricData >> assertion ) {
144
143
145
- AwaitUtil . awaitUntilAsserted (
144
+ awaitUntilAsserted (
146
145
() ->
147
146
assertion .accept (
148
147
assertThat (getExportedMetrics ())
@@ -158,7 +157,7 @@ public final void waitAndAssertMetrics(
158
157
@ SafeVarargs
159
158
public final void waitAndAssertMetrics (
160
159
String instrumentationName , Consumer <MetricAssert >... assertions ) {
161
- AwaitUtil . awaitUntilAsserted (
160
+ awaitUntilAsserted (
162
161
() -> {
163
162
Collection <MetricData > metrics = instrumentationMetrics (instrumentationName );
164
163
assertThat (metrics ).isNotEmpty ();
0 commit comments