Remove test usages of DataStream#getDefaultBackingIndexName in ILM integration tests#124319
Conversation
…csearch.x-pack.plugin.ilm.qa.multi-node.internalClusterTest`
…csearch.x-pack.plugin.ilm.qa.multi-node.javaRestTest`
|
Pinging @elastic/es-data-management (Team:Data Management) |
nielsbauman
left a comment
There was a problem hiding this comment.
Left some minor comments, but other than that LGTM. Thanks, Mary! One big step closer to never having these annoying test failures again :)
I think we should backport this because the failures occurred on 8.16 too.
Also, I see #124439 got opened after you opened this PR, so you can close that one with this PR too. Four closed issues with one PR is not too bad at all 😄
| String backingIndexName = getDataStreamBackingIndexNames(dataStream).getFirst(); | ||
| assertThat(backingIndexName, endsWith("1")); |
There was a problem hiding this comment.
How do you feel about asserting the size instead of the last character?
I'm thinking far in the future here, but what if we come to a point where we lazily initialize data streams and we first ingest to the failure store, then the failure store will end with a 1 instead of the backing index. That's super hypothetical, so I'm also fine to ignore it.
I do feel like asserting there is only one backing index is slightly more relevant than asserting the last character, but it's not a blocker for me. What do you think?
There was a problem hiding this comment.
I do feel like asserting there is only one backing index is slightly more relevant than asserting the last character, but it's not a blocker for me. What do you think?
I only added this assertion after a rollover was performed, so we would have to assert that size is 2. I can do that. No strong feelings about it.
test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java
Outdated
Show resolved
Hide resolved
...lti-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/TimeSeriesLifecycleActionsIT.java
Outdated
Show resolved
Hide resolved
...lti-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/TimeSeriesLifecycleActionsIT.java
Show resolved
Hide resolved
...de/src/javaRestTest/java/org/elasticsearch/xpack/ilm/actions/SearchableSnapshotActionIT.java
Outdated
Show resolved
Hide resolved
x-pack/plugin/ilm/src/internalClusterTest/java/org/elasticsearch/xpack/ilm/ILMMultiNodeIT.java
Outdated
Show resolved
Hide resolved
.../src/internalClusterTest/java/org/elasticsearch/xpack/ilm/ILMMultiNodeWithCCRDisabledIT.java
Outdated
Show resolved
Hide resolved
|
Thank you for the review @nielsbauman , comments addressed :) |
|
LGTM! Thanks! |
…integration tests (elastic#124319) * Incorporate review comments
…integration tests (elastic#124319) * Incorporate review comments (cherry picked from commit 44dd44b) # Conflicts: # x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/TimeSeriesDataStreamsIT.java # x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/TimeSeriesLifecycleActionsIT.java # x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/actions/SearchableSnapshotActionIT.java
…integration tests (#124319) (#124467) * Incorporate review comments (cherry picked from commit 44dd44b) # Conflicts: # x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/TimeSeriesDataStreamsIT.java # x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/TimeSeriesLifecycleActionsIT.java # x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/actions/SearchableSnapshotActionIT.java
…integration tests (elastic#124319) (elastic#124467) * Incorporate review comments (cherry picked from commit 44dd44b) # Conflicts: # x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/TimeSeriesDataStreamsIT.java # x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/TimeSeriesLifecycleActionsIT.java # x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/actions/SearchableSnapshotActionIT.java
…integration tests (elastic#124319) (elastic#124467) * Incorporate review comments (cherry picked from commit 44dd44b) # Conflicts: # x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/TimeSeriesDataStreamsIT.java # x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/TimeSeriesLifecycleActionsIT.java # x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/actions/SearchableSnapshotActionIT.java (cherry picked from commit 474d223) # Conflicts: # x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/actions/SearchableSnapshotActionIT.java
…integration tests (elastic#124319) (elastic#124467) * Incorporate review comments (cherry picked from commit 44dd44b) # Conflicts: # x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/TimeSeriesDataStreamsIT.java # x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/TimeSeriesLifecycleActionsIT.java # x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/actions/SearchableSnapshotActionIT.java (cherry picked from commit 474d223) # Conflicts: # x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/actions/SearchableSnapshotActionIT.java
…integration tests (#124319) (#124467) (#124473) * Incorporate review comments (cherry picked from commit 44dd44b) # Conflicts: # x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/TimeSeriesDataStreamsIT.java # x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/TimeSeriesLifecycleActionsIT.java # x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/actions/SearchableSnapshotActionIT.java
…integration tests (#124319) (#124467) (#124476) * Incorporate review comments (cherry picked from commit 44dd44b) # Conflicts: # x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/TimeSeriesDataStreamsIT.java # x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/TimeSeriesLifecycleActionsIT.java # x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/actions/SearchableSnapshotActionIT.java (cherry picked from commit 474d223) # Conflicts: # x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/actions/SearchableSnapshotActionIT.java
…integration tests (elastic#124319) * Incorporate review comments
…integration tests (#124319) (#124467) (#124482) * Incorporate review comments (cherry picked from commit 44dd44b) # Conflicts: # x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/TimeSeriesDataStreamsIT.java # x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/TimeSeriesLifecycleActionsIT.java # x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/actions/SearchableSnapshotActionIT.java (cherry picked from commit 474d223) # Conflicts: # x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/actions/SearchableSnapshotActionIT.java
…integration tests (elastic#124319) * Incorporate review comments
This test failure was already fixed by elastic#124319 but wasn't unmuted yet.
This test failure was already fixed by elastic#124319 but wasn't unmuted yet.
This test failure was already fixed by elastic#124319 but wasn't unmuted yet.
This test was already fixed in elastic#124319.
This test was already fixed in elastic#124319.
Relates to #123376.
In this PR we change the way we retrieve the name of the backing index of data streams. We replace usages of time sensitive
DataStream#getDefaultBackingIndexNamewith the retrieval of the name via an API call. The problem with using the time sensitive method is that we can have test failures around midnight.Because this is part of a larger effort #123376 we think it's a good idea to add a helper method to facilitate the retrieval of the backing index names to the base test classes.
Fixes: #117403
Fixes: #123203
Fixes: #123202
Fixes: #124439