From 18e01939025173c2f033fbac05219723498e4bb9 Mon Sep 17 00:00:00 2001 From: Gagan Juneja Date: Fri, 15 Mar 2024 13:19:42 +0530 Subject: [PATCH] fixes build errors Signed-off-by: Gagan Juneja --- .../telemetry/metrics/DefaultMetricsRegistryTests.java | 3 ++- .../telemetry/metrics/OTelMetricsTelemetryTests.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/libs/telemetry/src/test/java/org/opensearch/telemetry/metrics/DefaultMetricsRegistryTests.java b/libs/telemetry/src/test/java/org/opensearch/telemetry/metrics/DefaultMetricsRegistryTests.java index 853d6c78c77c9..872f697ade09e 100644 --- a/libs/telemetry/src/test/java/org/opensearch/telemetry/metrics/DefaultMetricsRegistryTests.java +++ b/libs/telemetry/src/test/java/org/opensearch/telemetry/metrics/DefaultMetricsRegistryTests.java @@ -63,7 +63,8 @@ public void testHistogram() { assertSame(mockHistogram, histogram); } - public void testObservableGauge() { + @SuppressWarnings("unchecked") + public void testGauge() { Closeable mockCloseable = mock(Closeable.class); when( defaultMeterRegistry.createGauge(any(String.class), any(String.class), any(String.class), any(Supplier.class), any(Tags.class)) diff --git a/plugins/telemetry-otel/src/test/java/org/opensearch/telemetry/metrics/OTelMetricsTelemetryTests.java b/plugins/telemetry-otel/src/test/java/org/opensearch/telemetry/metrics/OTelMetricsTelemetryTests.java index 8a0de65ea665f..2e89a3c488d5c 100644 --- a/plugins/telemetry-otel/src/test/java/org/opensearch/telemetry/metrics/OTelMetricsTelemetryTests.java +++ b/plugins/telemetry-otel/src/test/java/org/opensearch/telemetry/metrics/OTelMetricsTelemetryTests.java @@ -156,7 +156,8 @@ public void testHistogram() { verify(mockOTelDoubleHistogram).record(2.0, OTelAttributesConverter.convert(tags)); } - public void testObservableGauge() throws Exception { + @SuppressWarnings({ "rawtypes", "unchecked" }) + public void testGauge() throws Exception { String observableGaugeName = "test-gauge"; String description = "test"; String unit = "1";