-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Fix and unmute GetSnapshotsIT #129741
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
Fix and unmute GetSnapshotsIT #129741
Conversation
Closes: 129740
| // Allow the IN_PROGRESS snapshot to finish, then verify GET using SUCCESS has results and IN_PROGRESS does not. | ||
| // Do this in a finally, so the block doesn't interfere with teardown in the event of a failure | ||
| unblockAllDataNodes(repoName); | ||
| } |
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.
Just put this in a finally because I noticed when the block is applied and the test fails, it messes with the teardown.
| assertThat(snapshots, hasSize(2)); | ||
| var states = snapshots.stream().map(SnapshotInfo::state).collect(Collectors.toSet()); | ||
| assertThat(states, hasItem(SnapshotState.SUCCESS)); | ||
| assertThat(states, hasItem(SnapshotState.IN_PROGRESS)); |
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.
use assertThat/hasItem to give a more detailed failure message
|
Pinging @elastic/es-distributed-coordination (Team:Distributed Coordination) |
ywangd
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
I suppose it should also work by blocking master node for finalizing the snapshot. Explicitly indexing more data also makes sense.
Closes: 129740
Closes: 129740
I think because there was no new content since the last snapshot,
snapshot-in-progressnever got blocked by the repository block because it never went to the repository.Closes: #129740