From ab23887c96cfb267d545c588eea7b0e18e33bed4 Mon Sep 17 00:00:00 2001 From: alexey-ivanov-es Date: Mon, 4 Nov 2024 17:23:53 +0000 Subject: [PATCH] Backport of [CI] JvmStatsTests testJvmStats failing (115711) Fix and unmute test JvmStatsTests.testJvmStats --- muted-tests.yml | 3 --- .../test/java/org/elasticsearch/monitor/jvm/JvmStatsTests.java | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/muted-tests.yml b/muted-tests.yml index 7df511dddec8c..0af0d4a791a5a 100644 --- a/muted-tests.yml +++ b/muted-tests.yml @@ -270,9 +270,6 @@ tests: - class: org.elasticsearch.reservedstate.service.FileSettingsServiceTests method: testProcessFileChanges issue: https://github.com/elastic/elasticsearch/issues/115280 -- class: org.elasticsearch.monitor.jvm.JvmStatsTests - method: testJvmStats - issue: https://github.com/elastic/elasticsearch/issues/115711 - class: org.elasticsearch.xpack.inference.DefaultEndPointsIT method: testInferDeploysDefaultE5 issue: https://github.com/elastic/elasticsearch/issues/115361 diff --git a/server/src/test/java/org/elasticsearch/monitor/jvm/JvmStatsTests.java b/server/src/test/java/org/elasticsearch/monitor/jvm/JvmStatsTests.java index 28976d803ff53..7956d67c83c3b 100644 --- a/server/src/test/java/org/elasticsearch/monitor/jvm/JvmStatsTests.java +++ b/server/src/test/java/org/elasticsearch/monitor/jvm/JvmStatsTests.java @@ -53,7 +53,7 @@ public void testJvmStats() { assertThat(memoryPools, hasKey("Metaspace")); assertThat(memoryPools.keySet(), hasSize(greaterThan(3))); for (JvmStats.MemoryPool memoryPool : memoryPools.values()) { - assertThat(memoryPool.getUsed().getBytes(), greaterThan(0L)); + assertThat("Memory pool: " + memoryPool.getName(), memoryPool.getUsed().getBytes(), greaterThanOrEqualTo(0L)); } // Threads