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

Tests: Use all found index files instead of static list for static bwc tests #9854

Merged
merged 1 commit into from Feb 24, 2015

Conversation

rjernst
Copy link
Member

@rjernst rjernst commented Feb 24, 2015

It is a pain to add a new static index, and then have to update the old
index test. This removes the need for the latter step.

@rjernst rjernst added >test Issues or PRs that are addressing/adding tests v2.0.0-beta1 v1.5.0 v1.4.5 labels Feb 24, 2015
DirectoryStream.Filter<Path> filter = new DirectoryStream.Filter<Path>() {
public boolean accept(Path file) throws IOException {
String filename = file.getFileName().toString();
return filename.startsWith("index-") && filename.endsWith(".zip");
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add a comment, somewhere, that this test looks for all indexes matching the pattern index-*.zip?

I would maybe implement it this way too as a glob, with Files.newDirectoryStream(dir, "index-*.zip")

Copy link
Member Author

Choose a reason for hiding this comment

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

Nice, I didn't realize this worked. I changed it as suggested.

@rmuir
Copy link
Contributor

rmuir commented Feb 24, 2015

looks good, just a small suggestion

…c tests

It is a pain to add a new static index, and then have to update the old
index test.  This removes the need for the latter step.

closes elastic#9854
@rjernst rjernst merged commit d479611 into elastic:master Feb 24, 2015
rjernst added a commit that referenced this pull request Feb 24, 2015
…c tests

It is a pain to add a new static index, and then have to update the old
index test.  This removes the need for the latter step.

closes #9854
rjernst added a commit that referenced this pull request Feb 24, 2015
…c tests

It is a pain to add a new static index, and then have to update the old
index test.  This removes the need for the latter step.

closes #9854
@rjernst rjernst deleted the tests/simplify-old-index branch March 24, 2015 03:28
mute pushed a commit to mute/elasticsearch that referenced this pull request Jul 29, 2015
…c tests

It is a pain to add a new static index, and then have to update the old
index test.  This removes the need for the latter step.

closes elastic#9854
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>test Issues or PRs that are addressing/adding tests v1.4.5 v1.5.0 v2.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants