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

[CI] NullPointerException in PutMappingRequestTests #37654

Closed
markharwood opened this issue Jan 21, 2019 · 5 comments · Fixed by #37665
Closed

[CI] NullPointerException in PutMappingRequestTests #37654

markharwood opened this issue Jan 21, 2019 · 5 comments · Fixed by #37665
Assignees
Labels
>test-failure Triaged test failures from CI

Comments

@markharwood
Copy link
Contributor

Build: https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+master+multijob-unix-compatibility/os=centos/195/

java.lang.NullPointerException
	at __randomizedtesting.SeedInfo.seed([CC504FAEFA4AB2B3:ED387AB673ED5269]:0)
	at org.elasticsearch.client.indices.PutMappingRequestTests.assertEqualInstances(PutMappingRequestTests.java:59)
	at org.elasticsearch.client.indices.PutMappingRequestTests.assertEqualInstances(PutMappingRequestTests.java:29)
	at org.elasticsearch.test.AbstractXContentTestCase$XContentTester.test(AbstractXContentTestCase.java:137)
	at org.elasticsearch.test.AbstractXContentTestCase.testFromXContent(AbstractXContentTestCase.java:196)

Reproduces with :

./gradlew :client:rest-high-level:unitTest -Dtests.seed=CC504FAEFA4AB2B3 -Dtests.class=org.elasticsearch.client.indices.PutMappingRequestTests -Dtests.method="testFromXContent" -Dtests.security.manager=true -Dtests.locale=es-MX -Dtests.timezone=America/Havana -Dcompiler.java=11 -Druntime.java=8
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features

@spinscale
Copy link
Contributor

I muted this test in 7173aa2 due to some failures in feature branches and PRs

spinscale added a commit that referenced this issue Jan 21, 2019
This test failed in a couple of branches/PRs, thus muting for now.

Relates #37654
@cbuescher cbuescher self-assigned this Jan 21, 2019
@cbuescher
Copy link
Member

I can take a first look at this since @jtibshirani is out later today.

cbuescher pushed a commit to cbuescher/elasticsearch that referenced this issue Jan 21, 2019
The recently introduced client side PutMappingRequestTests has an edge case that
leads to failing tests. When the "source" or the original request is `null` it
gets rendered to xContent as an empty object, which by the test class itself is
parsed back as an empty map. For this reason the original and the parsed request
differ (one has an empty source, one an empty map). This fixes this edge case by
assuming an empty map means a null source in the request. In practice the
distinction doesn't matter because all the client side request does is write
itself to xContent, which gives the same result regardless of whether `source`
is null or empty.

Closes elastic#37654
@cbuescher
Copy link
Member

Got a fix ready at #37665

@jtibshirani
Copy link
Contributor

Thanks @cbuescher for fixing this! Next time I'll run some local tests with the @Repeat annotation you pointed me to.

jtibshirani pushed a commit to jtibshirani/elasticsearch that referenced this issue Jan 22, 2019
The recently introduced client side PutMappingRequestTests has an edge case that
leads to failing tests. When the "source" or the original request is `null` it
gets rendered to xContent as an empty object, which by the test class itself is
parsed back as an empty map. For this reason the original and the parsed request
differ (one has an empty source, one an empty map). This fixes this edge case by
assuming an empty map means a null source in the request. In practice the
distinction doesn't matter because all the client side request does is write
itself to xContent, which gives the same result regardless of whether `source`
is null or empty.

Closes elastic#37654
cbuescher pushed a commit that referenced this issue Jan 23, 2019
The recently introduced client side PutMappingRequestTests has an edge case that
leads to failing tests. When the "source" or the original request is `null` it
gets rendered to xContent as an empty object, which by the test class itself is
parsed back as an empty map. For this reason the original and the parsed request
differ (one has an empty source, one an empty map). This fixes this edge case by
assuming an empty map means a null source in the request. In practice the
distinction doesn't matter because all the client side request does is write
itself to xContent, which gives the same result regardless of whether `source`
is null or empty.

Closes #37654
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>test-failure Triaged test failures from CI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants