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

NPE on ElasticsearchIntegrationTest #9907

Closed
cfstout opened this issue Feb 26, 2015 · 1 comment · Fixed by #9909
Closed

NPE on ElasticsearchIntegrationTest #9907

cfstout opened this issue Feb 26, 2015 · 1 comment · Fixed by #9909
Assignees
Labels
>bug >test Issues or PRs that are addressing/adding tests v1.5.0 v2.0.0-beta1

Comments

@cfstout
Copy link

cfstout commented Feb 26, 2015

Seems that there is an NPE in the waitForDocs method of ElasticsearchIntegrationTest. I discovered when trying to write a test case using this class which calls the method: waitForDocs(final long numDocs) which propagates down a null value to this portion of the code.

Problem seems to surface on this line:
https://github.com/elasticsearch/elasticsearch/blob/master/src/test/java/org/elasticsearch/test/ElasticsearchIntegrationTest.java#L999

As noted in the documentation indexer is Nullable, but if null here, we see a null pointer. I think in the null case we could default to 0 and the code would work as documented, but wanted to get some feedback before making the change.

@s1monw
Copy link
Contributor

s1monw commented Feb 26, 2015

thanks for reporting it!! ;) I pushed a fix

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

Successfully merging a pull request may close this issue.

2 participants