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";