Skip to content

[CI] Failure in RangeQueryBuilderTests.testToQuery #28147

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 9, 2018 · 5 comments
Closed

[CI] Failure in RangeQueryBuilderTests.testToQuery #28147

cbuescher opened this issue Jan 9, 2018 · 5 comments
Assignees
Labels
:Search/Search Search-related issues that do not fall into other categories >test-failure Triaged test failures from CI

Comments

@cbuescher
Copy link
Member

This happend last night on 5.6 branch:

https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+5.6+periodic/1253/console

Strangely I cannot reproduce locally yet, although these normally reproduce well. I'll dig into it later.

REPRODUCE WITH: ./gradlew :core:test -Dtests.seed=F3EFFE4F7FDF63A4 -Dtests.class=org.elasticsearch.index.query.RangeQueryBuilderTests -Dtests.method="testToQuery" -Dtests.security.manager=true -Dtests.locale=ko-KR -Dtests.timezone=Africa/Lome

22:40:08 ERROR   0.04s J0 | RangeQueryBuilderTests.testToQuery <<< FAILURES!
22:40:08    > Throwable #1: java.lang.IllegalArgumentException: min value (101) is greater than max value (100)
22:40:08    > 	at __randomizedtesting.SeedInfo.seed([F3EFFE4F7FDF63A4:414FC710E5CA64E]:0)
22:40:08    > 	at org.apache.lucene.document.IntRange.verifyAndEncode(IntRange.java:132)
22:40:08    > 	at org.apache.lucene.document.IntRange.encode(IntRange.java:113)
22:40:08    > 	at org.apache.lucene.document.IntRange.newRelationQuery(IntRange.java:235)
22:40:08    > 	at org.apache.lucene.document.IntRange.newIntersectsQuery(IntRange.java:191)
22:40:08    > 	at org.elasticsearch.index.mapper.RangeFieldMapper$RangeType$5.intersectsQuery(RangeFieldMapper.java:677)
22:40:08    > 	at org.elasticsearch.index.mapper.RangeFieldMapper$RangeType.rangeQuery(RangeFieldMapper.java:779)
22:40:08    > 	at org.elasticsearch.index.mapper.RangeFieldMapper$RangeFieldType.rangeQuery(RangeFieldMapper.java:293)
22:40:08    > 	at org.elasticsearch.index.query.RangeQueryBuilder.doToQuery(RangeQueryBuilder.java:509)
22:40:08    > 	at org.elasticsearch.index.query.AbstractQueryBuilder.toQuery(AbstractQueryBuilder.java:96)
22:40:08    > 	at org.elasticsearch.test.AbstractQueryTestCase.testToQuery(AbstractQueryTestCase.java:571)
22:40:08    > 	at java.lang.Thread.run(Thread.java:748)
@cbuescher cbuescher added :Query DSL >test-failure Triaged test failures from CI labels Jan 9, 2018
@cbuescher cbuescher self-assigned this Jan 9, 2018
@cbuescher
Copy link
Member Author

This is caused when we hit a very rare combination of things in the test: a "from: 100, to: 101" query on an "integer_range" field, with both "includeUpper" and "includeLower" set to false. In this case the range goes from "101 to 100" and the RangeFieldMapper complains. We shouldn't test this combination.
This seems to only happen on 5.6 because on the 6.x and master branch we don't test with "integer_range" anymore. Still need to dig why that happened and if we should do that again.

@cbuescher
Copy link
Member Author

On the 6.x and master branch we don't test with "integer_range" anymore. Still need to dig why that happened and if we should do that again.

Just checked, the reason we don't test this anymore in the core query builder tests is due to moving the RangeFieldMapper and other to the new mappers-extra module in #26549, so we don't need to adapt any tests there.

@jasontedor
Copy link
Member

Just checked, the reason we don't test this anymore in the core query builder tests is due to moving the RangeFieldMapper and other to the new mappers-extra module in #26549, so we don't need to adapt any tests there.

The range field mapper was moved back to core in #27854.

@cbuescher
Copy link
Member Author

Okay, in that case it might make sense to add the test for the range fields in the range query builder tests. Will do just that.

@cbuescher
Copy link
Member Author

The failure on the 5.6 branch is fixed by 771fdc, and #28171 should track re-adding those
tests to master and 6.x, so I'm closing this.

cbuescher pushed a commit that referenced this issue Jan 23, 2018
…der tests (#28171)

The tests for those field types were removed in #26549 because the range mapper
was moved to a module, but later this mapper was moved back to core in #27854.
This change adds back those two field types like before to the general setup in
AbstractQueryTestCase and adds some specifics to the RangeQueryBuilder and
TermsQueryBuilder tests. Also adding back an integration test in SearchQueryIT that
has been removed before but that can be kept with the mapper back in core now.

Relates to #28147
cbuescher pushed a commit that referenced this issue Jan 23, 2018
…der tests (#28171)

The tests for those field types were removed in #26549 because the range mapper
was moved to a module, but later this mapper was moved back to core in #27854.
This change adds back those two field types like before to the general setup in
AbstractQueryTestCase and adds some specifics to the RangeQueryBuilder and
TermsQueryBuilder tests. Also adding back an integration test in SearchQueryIT that
has been removed before but that can be kept with the mapper back in core now.

Relates to #28147
@clintongormley clintongormley added :Search/Search Search-related issues that do not fall into other categories and removed :Query DSL labels Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Search/Search Search-related issues that do not fall into other categories >test-failure Triaged test failures from CI
Projects
None yet
Development

No branches or pull requests

3 participants