Skip to content

Commit dd694e8

Browse files
committed
Use explicit type rater than var for exporter result
1 parent 23731f3 commit dd694e8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

x-pack/plugin/otel-data/src/javaRestTest/java/org/elasticsearch/action/otlp/OTLPMetricsIndexingRestIT.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import io.opentelemetry.exporter.internal.FailedExportException;
1212
import io.opentelemetry.exporter.otlp.http.metrics.OtlpHttpMetricExporter;
1313
import io.opentelemetry.sdk.common.Clock;
14+
import io.opentelemetry.sdk.common.CompletableResultCode;
1415
import io.opentelemetry.sdk.common.InstrumentationScopeInfo;
1516
import io.opentelemetry.sdk.metrics.SdkMeterProvider;
1617
import io.opentelemetry.sdk.metrics.data.MetricData;
@@ -115,7 +116,7 @@ public void testIngestMetricDataViaMetricExporter() throws Exception {
115116
}
116117

117118
private void export(List<MetricData> metrics) throws Exception {
118-
var result = exporter.export(metrics).join(10, TimeUnit.SECONDS);
119+
CompletableResultCode result = exporter.export(metrics).join(10, TimeUnit.SECONDS);
119120
Throwable failure = result.getFailureThrowable();
120121
if (failure instanceof Exception e) {
121122
throw e;

0 commit comments

Comments
 (0)