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

SimpleQueryStringBuilderTests fails on 6.x #35773

Closed
javanna opened this issue Nov 21, 2018 · 4 comments
Closed

SimpleQueryStringBuilderTests fails on 6.x #35773

javanna opened this issue Nov 21, 2018 · 4 comments
Assignees
Labels
:Search/Search Search-related issues that do not fall into other categories >test-failure Triaged test failures from CI

Comments

@javanna
Copy link
Member

javanna commented Nov 21, 2018

Recent failures: https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+6.x+intake/239/ and https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+6.x+multijob-unix-compatibility/os=oraclelinux/71/console .

11:11:34 FAILURE 0.01s J4 | SimpleQueryStringBuilderTests.testUnmappedFieldNoTokenWithAndOperator <<< FAILURES!
11:11:34    > Throwable #1: java.lang.AssertionError: expected:<+mapped_string:first +mapped_string:second> but was:<MatchNoDocsQuery("empty string passed to query parser")>
11:11:34    > 	at __randomizedtesting.SeedInfo.seed([9937D8E57DE82F56:A3EFDB46BCC88FD2]:0)
11:11:34    > 	at org.elasticsearch.index.query.SimpleQueryStringBuilderTests.testUnmappedFieldNoTokenWithAndOperator(SimpleQueryStringBuilderTests.java:727)
11:11:34    > 	at java.lang.Thread.run(Thread.java:748)
FAILURE 1.79s | SimpleQueryStringBuilderTests.testToQuery <<< FAILURES!
   > Throwable #1: java.lang.AssertionError: 
   > Expected: an instance of org.apache.lucene.search.DisjunctionMaxQuery
   >      but: <MatchNoDocsQuery("empty string passed to query parser")> is a org.apache.lucene.search.MatchNoDocsQuery
   >    at __randomizedtesting.SeedInfo.seed([C7621377DC53D26C:30991149ADD01786]:0)
   >    at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
   >    at org.elasticsearch.index.query.SimpleQueryStringBuilderTests.doAssertLuceneQuery(SimpleQueryStringBuilderTests.java:278)
   >    at org.elasticsearch.index.query.SimpleQueryStringBuilderTests.doAssertLuceneQuery(SimpleQueryStringBuilderTests.java:67)
   >    at org.elasticsearch.test.AbstractQueryTestCase.assertLuceneQuery(AbstractQueryTestCase.java:522)
   >    at org.elasticsearch.test.AbstractQueryTestCase.testToQuery(AbstractQueryTestCase.java:436)
   >    at java.lang.Thread.run(Thread.java:748)

Reproduce lines (they both reproduce for me):

./gradlew :server:test -Dtests.seed=9937D8E57DE82F56 -Dtests.class=org.elasticsearch.index.query.SimpleQueryStringBuilderTests -Dtests.method="testUnmappedFieldNoTokenWithAndOperator" -Dtests.security.manager=true -Dtests.locale=sr-RS -Dtests.timezone=America/Argentina/Salta -Dcompiler.java=11 -Druntime.java=8
./gradlew :server:test \
  -Dtests.seed=C7621377DC53D26C \
  -Dtests.class=org.elasticsearch.index.query.SimpleQueryStringBuilderTests \
  -Dtests.method="testToQuery" \
  -Dtests.security.manager=true \
  -Dtests.locale=fr-FR \
  -Dtests.timezone=Asia/Gaza \
  -Dcompiler.java=11 \
  -Druntime.java=8

I suspect this is due to 92331fd .

@javanna javanna added :Search/Search Search-related issues that do not fall into other categories >test-failure Triaged test failures from CI labels Nov 21, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search

@javanna
Copy link
Member Author

javanna commented Nov 21, 2018

I muted this test as it is failing quite frequently on 6.x.

@javanna javanna changed the title SimpleQueryStringBuilderTests.testUnmappedFieldNoTokenWithAndOperator fails on 6.x SimpleQueryStringBuilderTests fails on 6.x Nov 21, 2018
@cbuescher cbuescher self-assigned this Nov 21, 2018
javanna added a commit that referenced this issue Nov 21, 2018
@cbuescher
Copy link
Member

SimpleQueryStringBuilderTests.testUnmappedFieldNoTokenWithAndOperator <<< FAILURES

This happens when we don't register any types, which doesn't happen any more on 7.0 because of types removal. I will add an assumeTrue like we have in other tests here.

SimpleQueryStringBuilderTests.testToQuery <<< FAILURES!

This one is also related to no types being present in conjunction with a selection of more than one field. We used to build DisjunctionMaxQuerys containing only MatchNoDocsQuery on these cases, but we only build one MatchNoDocsQuery now. Will update the assumptions in the tests here.

cbuescher pushed a commit to cbuescher/elasticsearch that referenced this issue Nov 21, 2018
cbuescher pushed a commit that referenced this issue Nov 21, 2018
@cbuescher
Copy link
Member

I pushed 48f9c0d with a fix.

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

4 participants