Skip to content
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

[TEST] Extend ShardPathTests for MDP #79015

Merged
merged 2 commits into from
Oct 13, 2021

Conversation

grcevski
Copy link
Contributor

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

Add few more tests to ShardPathTests to cover the
usage with multiple data paths.

Relates to elastic#78485
@grcevski grcevski added >test Issues or PRs that are addressing/adding tests :Core/Infra/Core Core issues without another label v8.0.0 Team:Core/Infra Meta label for core/infra team auto-backport Automatically create backport pull requests when merged v7.16.0 labels Oct 12, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

@grcevski grcevski requested a review from rjernst October 12, 2021 21:39
Copy link
Member

@rjernst rjernst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

.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]));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any assertion to make after this, like the dirs are deleted?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦 I totally lost my train of thought there 🙂. Let me add that.

@grcevski grcevski merged commit 3d3ca89 into elastic:master Oct 13, 2021
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
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
7.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Automatically create backport pull requests when merged :Core/Infra/Core Core issues without another label Team:Core/Infra Meta label for core/infra team >test Issues or PRs that are addressing/adding tests v7.16.0 v8.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants