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
This commit is contained in:
Martijn van Groningen 2023-11-24 15:27:03 +01:00 committed by GitHub
parent 0e304e273a
commit fa416c4b65
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -80,6 +80,7 @@ public class DownsampleActionIT extends ESRestTestCase {
}, },
"routing_path": ["metricset"], "routing_path": ["metricset"],
"mode": "time_series", "mode": "time_series",
"look_ahead_time": "1m",
"lifecycle.name": "%s" "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 { public void testTsdbDataStreams() throws Exception {
// Create the ILM policy // Create the ILM policy
DateHistogramInterval fixedInterval = ConfigTestHelpers.randomInterval(); DateHistogramInterval fixedInterval = ConfigTestHelpers.randomInterval();
@ -337,7 +337,10 @@ public class DownsampleActionIT extends ESRestTestCase {
rolloverMaxOneDocCondition(client(), dataStream); rolloverMaxOneDocCondition(client(), dataStream);
String rollupIndex = waitAndGetRollupIndexName(client(), backingIndexName, fixedInterval); 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(() -> 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(() -> assertFalse("Source index should have been deleted", indexExists(backingIndexName)), 30, TimeUnit.SECONDS);
assertBusy(() -> { assertBusy(() -> {
@ -611,7 +614,7 @@ public class DownsampleActionIT extends ESRestTestCase {
} catch (IOException e) { } catch (IOException e) {
return false; 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]); logger.info("--> original index name is [{}], rollup index name is [{}]", originalIndexName, rollupIndexName[0]);
return rollupIndexName[0]; return rollupIndexName[0];
} }