Skip to content

NPE on ElasticsearchIntegrationTest #9907

@cfstout

Description

@cfstout

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions