-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Test fix: make DataStreamIT not sensitive to midnight (#90595) #90910
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Pinging @elastic/es-data-management (Team:Data Management) |
andreidan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for fixing these Mary
| assertThat(dataStream.getIndices().get(0).getName(), backingIndexEqualTo("metrics-foo", 1)); | ||
|
|
||
| String backingIndex = DataStream.getDefaultBackingIndexName("metrics-bar", 1); | ||
| DataStream barDataStream = getDataStreamResponse.getDataStreams().get(0).getDataStream(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bar is before foo ! 🤯 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha, you are laughing but when I was first reading it I could swear foo was before bar :p. I had to reread it.
💚 Backport successful
|
The tests in
DataStreamITwere usingDataStream::getDefaultBackingIndexNameto determine the name of the backing index of a data stream. SinceDataStream::getDefaultBackingIndexNameis time sensitive (it uses the day in the index name), if the tests are executed around midnight there is a chance that the tests will fail.To fix that, we took the following steps:
backingIndexEqualToto verify if the name of the index is the expected one by checking the data stream name and the generation but not the day.Closes: #90595