Skip to content

Commit 4cd1264

Browse files
opensearch-trigger-bot[bot]github-actions[bot]Gagan Juneja
authored
Fixes flaky test org.opensearch.telemetry.metrics.TelemetryMetricsEnabledSanityIT.testGauge (#12745) (#12747)
(cherry picked from commit 2567792) Signed-off-by: Gagan Juneja <gjjuneja@amazon.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Gagan Juneja <gjjuneja@amazon.com>
1 parent a8fa92a commit 4cd1264

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

plugins/telemetry-otel/src/internalClusterTest/java/org/opensearch/telemetry/metrics/TelemetryMetricsEnabledSanityIT.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ public void testHistogram() throws Exception {
124124
assertEquals(1.0, histogramPointData.getMin(), 1.0);
125125
}
126126

127-
public void testObservableGauge() throws Exception {
128-
String metricName = "test-observable-gauge";
127+
public void testGauge() throws Exception {
128+
String metricName = "test-gauge";
129129
MetricsRegistry metricsRegistry = internalCluster().getInstance(MetricsRegistry.class);
130130
InMemorySingletonMetricsExporter.INSTANCE.reset();
131131
Tags tags = Tags.create().addTag("test", "integ-test");
@@ -137,7 +137,7 @@ public void testObservableGauge() throws Exception {
137137

138138
InMemorySingletonMetricsExporter exporter = InMemorySingletonMetricsExporter.INSTANCE;
139139

140-
assertEquals(2.0, getMaxObservableGaugeValue(exporter, metricName), 0.0);
140+
assertTrue(getMaxObservableGaugeValue(exporter, metricName) >= 2.0);
141141
gaugeCloseable.close();
142142
double observableGaugeValueAfterStop = getMaxObservableGaugeValue(exporter, metricName);
143143

0 commit comments

Comments
 (0)