-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Mango text index test fixes #894
Merged
willholley
merged 9 commits into
apache:master
from
willholley:mango_fix_text_index_tests
Oct 17, 2017
Merged
Mango text index test fixes #894
willholley
merged 9 commits into
apache:master
from
willholley:mango_fix_text_index_tests
Oct 17, 2017
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
garrensmith
approved these changes
Oct 17, 2017
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 nice work
garrensmith
reviewed
Oct 17, 2017
self.db.create_index(["name", "location", "user_id"], ddoc="aaa") | ||
self.db.create_index(["name", "age", "user_id"], ddoc="bbb") | ||
self.db.create_index(["name", "age", "user_id"], ddoc="aaa") | ||
self.db.create_index(["name", "age"], ddoc="_design/bbb") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test is failing. you don't need the _design
here.
willholley
force-pushed
the
mango_fix_text_index_tests
branch
2 times, most recently
from
October 17, 2017 13:41
7588d7a
to
30a5959
Compare
Index selection tests behave differently depending on which index types are available. This splits the tests into 2 suites (with some overlap): JSONIndexSelectionTests - tests that should run with no text indexes TextIndexSelectionTests - tests that should run with text indexes Previously, if text indexes were available they would always be used, effectively causing us to skip testing the situation where they were not available.
Skip operator tests that fail when text indexes are used. Ideally these would be consistent across all index types but they are not today.
Previously the text tests were run if the working directory was "test" and the dreyfus source code was detected in the CouchDB checkout directory. Instead, allow an environment variable to be specified to toggle whether text index support is available or not.
Some of the test fixtures were not being picked up automatically because they didn't have "test" in the filename or fixture name. This standardizes the file naming to ensure we always run all the mango tests.
These tests were not running previously and were incorrect. This fixes the assertions so that they match the expected behaviour which changed in #816.
willholley
force-pushed
the
mango_fix_text_index_tests
branch
from
October 17, 2017 14:56
30a5959
to
419a5a0
Compare
wohali
pushed a commit
that referenced
this pull request
Oct 19, 2017
* Split out text index selection tests * Skip operator tests that do not apply to text indexes * Only run array length tests against text indexes * Fix index crud tests when text indexes available * Use environment variable to switch on text tests * Fix incorrect text sort assertion in test * Always use -test in fixture filename * Fix index selection test compatibility with #816. * Improve test README
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
The text index tests are not run routinely because CouchDB doesn't natively support them. This PR corrects some bad assertions as a result of recent improvements/fixes to Mango and ensures that all of the expected tests are run.
Testing recommendations
Run the test suite with and without text index support.
Checklist