From fa416c4b655782dcc723a4b6e580facb10d1922c Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Fri, 24 Nov 2023 15:27:03 +0100 Subject: [PATCH] Unmute DownsampleActionIT#testTsdbDataStreams test (#102334) The likely cause is that the downsample step wasn't executed, because the index.time_series.end_time index setting was after current time. Two tweaks to avoid this failure: * Lower index.look_ahead_time * Increase wait time in waitAndGetRollupIndexName() Closes #100271 --- .../xpack/ilm/actions/DownsampleActionIT.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/actions/DownsampleActionIT.java b/x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/actions/DownsampleActionIT.java index 4f1efbbca387..2e61b6e978b6 100644 --- a/x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/actions/DownsampleActionIT.java +++ b/x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/actions/DownsampleActionIT.java @@ -80,6 +80,7 @@ public class DownsampleActionIT extends ESRestTestCase { }, "routing_path": ["metricset"], "mode": "time_series", + "look_ahead_time": "1m", "lifecycle.name": "%s" } }, @@ -301,7 +302,6 @@ public class DownsampleActionIT extends ESRestTestCase { }); } - @AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/100271") public void testTsdbDataStreams() throws Exception { // Create the ILM policy DateHistogramInterval fixedInterval = ConfigTestHelpers.randomInterval(); @@ -337,7 +337,10 @@ public class DownsampleActionIT extends ESRestTestCase { rolloverMaxOneDocCondition(client(), dataStream); String rollupIndex = waitAndGetRollupIndexName(client(), backingIndexName, fixedInterval); - assertNotNull("Cannot retrieve rollup index name", rollupIndex); + if (rollupIndex == null) { + logger.warn("explain:" + explainIndex(client(), backingIndexName)); + } + assertNotNull(String.format(Locale.ROOT, "Cannot retrieve rollup index [%s]", rollupIndex), rollupIndex); assertBusy(() -> assertTrue("Rollup index does not exist", indexExists(rollupIndex)), 30, TimeUnit.SECONDS); assertBusy(() -> assertFalse("Source index should have been deleted", indexExists(backingIndexName)), 30, TimeUnit.SECONDS); assertBusy(() -> { @@ -611,7 +614,7 @@ public class DownsampleActionIT extends ESRestTestCase { } catch (IOException e) { return false; } - }, 60, TimeUnit.SECONDS); + }, 120, TimeUnit.SECONDS); // High timeout in case we're unlucky and end_time has been increased. logger.info("--> original index name is [{}], rollup index name is [{}]", originalIndexName, rollupIndexName[0]); return rollupIndexName[0]; }