[TEST] Extend ShardPathTests for MDP#79015
Merged
grcevski merged 2 commits intoelastic:masterfrom Oct 13, 2021
Merged
Conversation
Add few more tests to ShardPathTests to cover the usage with multiple data paths. Relates to elastic#78485
Collaborator
|
Pinging @elastic/es-core-infra (Team:Core/Infra) |
rjernst
approved these changes
Oct 12, 2021
| .put(IndexMetadata.SETTING_VERSION_CREATED, Version.CURRENT).build(); | ||
| IndexSettings idxSettings = IndexSettingsModule.newIndexSettings(randomAlphaOfLengthBetween(1, 10), indexSettings); | ||
|
|
||
| ShardPath.deleteLeftoverShardDirectory(logger, env, lock, idxSettings, shardPaths -> assertEquals(path, shardPaths[0])); |
Member
There was a problem hiding this comment.
Any assertion to make after this, like the dirs are deleted?
Contributor
Author
There was a problem hiding this comment.
🤦 I totally lost my train of thought there 🙂. Let me add that.
grcevski
added a commit
to grcevski/elasticsearch
that referenced
this pull request
Oct 13, 2021
Add few more tests to ShardPathTests to cover the usage with multiple data paths. Relates to elastic#78485
Collaborator
💚 Backport successful
|
grcevski
added a commit
that referenced
this pull request
Oct 13, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add few more tests to ShardPathTests to cover the
usage with multiple data paths.
I wasn't able to find any defects in the code related to multi paths, except that perhaps deleteLeftoverShardDirectory doesn't work with multiple paths yet. At the moment the only place where we call this delete method is with a single path use, so likely it isn't an issue for now.
Relates to #78485