Skip to content

Brings Lucene query assertions back to QB test.#12810

Merged
MaineC merged 1 commit intoelastic:feature/query-refactoringfrom
MaineC:feature/simple-query-string-test
Aug 20, 2015
Merged

Brings Lucene query assertions back to QB test.#12810
MaineC merged 1 commit intoelastic:feature/query-refactoringfrom
MaineC:feature/simple-query-string-test

Conversation

@MaineC
Copy link
Copy Markdown

@MaineC MaineC commented Aug 11, 2015

This brings the Lucene query assertions back to the querybuilder test that were
removed in the ancient past when we tested Lucene queries through their
inherent equals method. As we no longer do that it makes sense to do at least
coarse sanity checking on the generated Lucene query. More such checks are
being added as part of this commit.

Note: This goes against the feature/query-refactoring feature branch.

Relates to #10217

@MaineC MaineC added >test Issues or PRs that are addressing/adding tests :Query Refactoring labels Aug 11, 2015
@MaineC MaineC self-assigned this Aug 11, 2015
@javanna
Copy link
Copy Markdown
Contributor

javanna commented Aug 13, 2015

I am conflicted on whether the doAssertLuceneQuery goes too deep now, and whether this is maintainable on the long run. That said let's give it a try and see. LGTM

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From first glance to me its not clear why all these assertions are the same. When is this not the case and might it be easier to just test those cases? Not sure because I don't know how the resolution works though.

@MaineC MaineC force-pushed the feature/simple-query-string-test branch 2 times, most recently from 50c9b81 to 627213a Compare August 18, 2015 18:05
This brings the Lucene query assertions back to the querybuilder test that were
removed in the ancient past when we tested Lucene queries through their
inherent equals method. As we no longer do that it makes sense to do at least
coarse sanity checking on the generated Lucene query. More such checks are
being added as part of this commit.

Relates to elastic#10217
@MaineC MaineC force-pushed the feature/simple-query-string-test branch from 627213a to 7dcf0da Compare August 18, 2015 18:06
@MaineC
Copy link
Copy Markdown
Author

MaineC commented Aug 18, 2015

@cbuescher Thanks for your comment - I changed the if in question slightly, feel free to take another look.

@cbuescher
Copy link
Copy Markdown
Member

@MaineC thanks, now I see the different cases much clearer. LGTM

MaineC pushed a commit that referenced this pull request Aug 20, 2015
Brings Lucene query assertions to QB test.

Theser assertions were originally added as part of the SimpleQueryStringQueryBuilder refactoring but removed later as there were more extensive tests in place already. This commit brings them back in as the other tests have been removed.

This relates to #10217 and #11274
@MaineC MaineC merged commit 0b34c73 into elastic:feature/query-refactoring Aug 20, 2015
@clintongormley clintongormley added :Search/Search Search-related issues that do not fall into other categories and removed :Query Refactoring 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 Issues or PRs that are addressing/adding tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants