From 7e809cee8995fba9e343e670d094a84a69882e4b Mon Sep 17 00:00:00 2001 From: Artem Prigoda Date: Tue, 18 Feb 2025 13:03:00 +0100 Subject: [PATCH] Add more logging for `IndexRecoveryIT#testSourceThrottling` I couldn't reproduce the failure of the throttling time being zero on the recovery target node. Added more logging for the stats in case of failure. Resolve #122712 --- muted-tests.yml | 3 --- .../indices/recovery/IndexRecoveryIT.java | 12 ++++++++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/muted-tests.yml b/muted-tests.yml index ddcd4a988dbd7..181edd6155d3c 100644 --- a/muted-tests.yml +++ b/muted-tests.yml @@ -383,9 +383,6 @@ tests: - class: org.elasticsearch.search.basic.SearchWithRandomDisconnectsIT method: testSearchWithRandomDisconnects issue: https://github.com/elastic/elasticsearch/issues/122707 -- class: org.elasticsearch.indices.recovery.IndexRecoveryIT - method: testSourceThrottling - issue: https://github.com/elastic/elasticsearch/issues/122712 - class: org.elasticsearch.entitlement.qa.EntitlementsDeniedNonModularIT issue: https://github.com/elastic/elasticsearch/issues/122569 - class: org.elasticsearch.entitlement.qa.EntitlementsAllowedNonModularIT diff --git a/server/src/internalClusterTest/java/org/elasticsearch/indices/recovery/IndexRecoveryIT.java b/server/src/internalClusterTest/java/org/elasticsearch/indices/recovery/IndexRecoveryIT.java index a8caca94289b6..dfac98524d1c0 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/indices/recovery/IndexRecoveryIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/indices/recovery/IndexRecoveryIT.java @@ -342,9 +342,17 @@ public void assertNodeHasThrottleTimeAndNoRecoveries(String nodeName, Boolean is assertThat(recoveryStats.currentAsSource(), equalTo(0)); assertThat(recoveryStats.currentAsTarget(), equalTo(0)); if (isRecoveryThrottlingNode) { - assertThat("Throttling should be >0 for '" + nodeName + "'", recoveryStats.throttleTime().millis(), greaterThan(0L)); + assertThat( + "Throttling should be >0 for '" + nodeName + "'. Node stats: " + nodesStatsResponse, + recoveryStats.throttleTime().millis(), + greaterThan(0L) + ); } else { - assertThat("Throttling should be =0 for '" + nodeName + "'", recoveryStats.throttleTime().millis(), equalTo(0L)); + assertThat( + "Throttling should be =0 for '" + nodeName + "'. Node stats: " + nodesStatsResponse, + recoveryStats.throttleTime().millis(), + equalTo(0L) + ); } }