Skip to content

Simplify IndexFree tests #790

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

Merged
merged 2 commits into from
Sep 12, 2019
Merged

Simplify IndexFree tests #790

merged 2 commits into from
Sep 12, 2019

Conversation

schmidt-sebastian
Copy link
Contributor

This simplifies the newly added Index-Free tests in LocalStoreTests:

  • Instead of using three docs, most tests only need two.
  • Removed some setup and asserts that were unrelated to the actual test.

@googlebot googlebot added the cla: yes Override cla label Sep 12, 2019
for (MaybeDocument doc : docs) {
DocumentChange change =
new DocumentChange(updatedInTargets, removedFromTargets, doc.getKey(), doc);
aggregator.handleDocumentChange(change);
version = doc.getVersion().compareTo(version) > 0 ? doc.getVersion() : version;
Copy link
Contributor Author

@schmidt-sebastian schmidt-sebastian Sep 12, 2019

Choose a reason for hiding this comment

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

Not sure why this worked before but testQueriesIncludeDocumentsFromOtherQueries() needs to use 20 as the snapshot version (from the last doc) in order to use a higher read time for the newly added doc.

Copy link
Contributor

@wilhuff wilhuff left a comment

Choose a reason for hiding this comment

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

LGTM

@wilhuff wilhuff assigned schmidt-sebastian and unassigned wilhuff Sep 12, 2019
@schmidt-sebastian schmidt-sebastian merged commit a011927 into master Sep 12, 2019
schmidt-sebastian added a commit that referenced this pull request Sep 13, 2019
schmidt-sebastian added a commit that referenced this pull request Sep 13, 2019
schmidt-sebastian added a commit that referenced this pull request Sep 13, 2019
@rlazo rlazo deleted the mrschmidt/simplifytest branch October 3, 2019 14:44
@firebase firebase locked and limited conversation to collaborators Oct 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants