Skip to content

[TEST] Extend ShardPathTests for MDP#79015

Merged
grcevski merged 2 commits intoelastic:masterfrom
grcevski:tests/mdp_shard_path
Oct 13, 2021
Merged

[TEST] Extend ShardPathTests for MDP#79015
grcevski merged 2 commits intoelastic:masterfrom
grcevski:tests/mdp_shard_path

Conversation

@grcevski
Copy link
Copy Markdown
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
Copy Markdown
Collaborator

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

@grcevski grcevski requested a review from rjernst October 12, 2021 21:39
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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