Skip to content

Commit 938f74b

Browse files
authored
Wait longer for CCR auto-follow stats to appear in monitoring index (#85278)
The test `AutoFollowIT.testAutoFollowPatterns()` failed multiple times when waiting for CCR's auto-follow stats to be collected and indexed in the `.monitoring-es-*` index. This is possibly because monitoring data are collected every 10 seconds and some of them can take more time to be collected, exceeding the 30s timeout in the test. This pull request re-uses the `assertLongBusy()` so that the test will wait more time for the data to show up and in case the data are not here it will prints out the current CCR's auto-follow stats for debugging purpose. Closes #84403
1 parent 947f88b commit 938f74b

File tree

1 file changed

+3
-6
lines changed
  • x-pack/plugin/ccr/qa/multi-cluster/src/test/java/org/elasticsearch/xpack/ccr

1 file changed

+3
-6
lines changed

x-pack/plugin/ccr/qa/multi-cluster/src/test/java/org/elasticsearch/xpack/ccr/AutoFollowIT.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ public void testMultipleAutoFollowPatternsDifferentClusters() throws Exception {
105105
}
106106
}
107107

108-
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/84403")
109108
public void testAutoFollowPatterns() throws Exception {
110109
if ("follow".equals(targetCluster) == false) {
111110
logger.info("skipping test, waiting for target cluster [follow]");
@@ -176,14 +175,12 @@ public void testAutoFollowPatterns() throws Exception {
176175
assertThat(indexExists(excludedIndex), is(false));
177176
});
178177

179-
assertBusy(() -> {
180-
verifyCcrMonitoring("metrics-20210101", "metrics-20210101");
181-
verifyAutoFollowMonitoring();
182-
}, 30, TimeUnit.SECONDS);
178+
assertLongBusy(() -> verifyCcrMonitoring("metrics-20210101", "metrics-20210101"));
179+
assertLongBusy(ESCCRRestTestCase::verifyAutoFollowMonitoring);
183180

184181
} finally {
185-
cleanUpLeader(List.of("metrics-20210101", excludedIndex), List.of(), List.of());
186182
cleanUpFollower(List.of("metrics-20210101"), List.of(), List.of(autoFollowPatternName));
183+
cleanUpLeader(List.of("metrics-20210101", excludedIndex), List.of(), List.of());
187184
}
188185
}
189186

0 commit comments

Comments
 (0)