Skip to content

[Tests] TopHitsAggregatorTests#testInsideTerms fails reproducibly #22818

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

Closed
cbuescher opened this issue Jan 26, 2017 · 3 comments
Closed

[Tests] TopHitsAggregatorTests#testInsideTerms fails reproducibly #22818

cbuescher opened this issue Jan 26, 2017 · 3 comments
Assignees
Labels
:Analytics/Aggregations Aggregations >test Issues or PRs that are addressing/adding tests v6.0.0-alpha1

Comments

@cbuescher
Copy link
Member

This one fails reproducibly on master (2abe948):

https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+5.x+multijob-unix-compatibility/os=ubuntu/475

'''
gradle :core:test -Dtests.seed=E1AB0588265D530F -Dtests.class=org.elasticsearch.search.aggregations.metrics.tophits.TopHitsAggregatorTests -Dtests.method="testInsideTerms" -Dtests.security.manager=true -Dtests.locale=en-IE -Dtests.timezone=Israel
'''

Error looks like this:

ERROR   0.04s J1 | TopHitsAggregatorTests.testInsideTerms <<< FAILURES!
   > Throwable #1: java.lang.ClassCastException: org.apache.lucene.index.ParallelCompositeReader cannot be cast to org.apache.lucene.index.DirectoryReader
   > 	at __randomizedtesting.SeedInfo.seed([E1AB0588265D530F:11E1E897EE56B196]:0)
   > 	at org.elasticsearch.search.aggregations.support.ValuesSource$Bytes$WithOrdinals$FieldData.globalOrdinalsValues(ValuesSource.java:150)
   > 	at org.elasticsearch.search.aggregations.support.ValuesSource$Bytes$WithOrdinals.globalMaxOrd(ValuesSource.java:123)
   > 	at org.elasticsearch.search.aggregations.bucket.terms.TermsAggregatorFactory.doCreateInternal(TermsAggregatorFactory.java:118)
   > 	at org.elasticsearch.search.aggregations.support.ValuesSourceAggregatorFactory.createInternal(ValuesSourceAggregatorFactory.java:55)
   > 	at org.elasticsearch.search.aggregations.AggregatorFactory.create(AggregatorFactory.java:221)
   > 	at org.elasticsearch.search.aggregations.AggregatorTestCase.createAggregator(AggregatorTestCase.java:121)
   > 	at org.elasticsearch.search.aggregations.AggregatorTestCase.searchAndReduce(AggregatorTestCase.java:167)
   > 	at org.elasticsearch.search.aggregations.metrics.tophits.TopHitsAggregatorTests.testCase(TopHitsAggregatorTests.java:135)
   > 	at org.elasticsearch.search.aggregations.metrics.tophits.TopHitsAggregatorTests.testInsideTerms(TopHitsAggregatorTests.java:83)
   > 	at java.lang.Thread.run(Thread.java:745)
@cbuescher cbuescher added :Analytics/Aggregations Aggregations >test Issues or PRs that are addressing/adding tests v6.0.0-alpha1 labels Jan 26, 2017
@cbuescher
Copy link
Member Author

@nik9000 would you mind taking a look since you recently introduced that test?

@nik9000
Copy link
Member

nik9000 commented Jan 26, 2017

Sure!

@nik9000
Copy link
Member

nik9000 commented Jan 26, 2017

I fixed it by being careful about getting the reader. The same fix that the TermsAggregatorTests uses.

master: 1baa884
5.x: 45aea28

nik9000 added a commit that referenced this issue Jan 26, 2017
It needs a DirectoryReader so it has to be careful.

Closes #22818
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/Aggregations Aggregations >test Issues or PRs that are addressing/adding tests v6.0.0-alpha1
Projects
None yet
Development

No branches or pull requests

2 participants