Skip to content

Speed up FieldPath validation tests #1147

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 4 commits into from
Aug 21, 2018

Conversation

schmidt-sebastian
Copy link
Contributor

These are two test cases that keep failing for me on CI, and I hope that I can make them pass more often by moving some of the document mutations out of the for-loop and into the initialization.

promises.push(expectFieldPathToFail(db, fieldPath, reason));
}
return Promise.all(promises);
const docRef = db.collection('test').doc();
Copy link
Contributor

Choose a reason for hiding this comment

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

Optional nit: consider refactoring the piece of code that promises a snapshot into a helper function. OTOH, since it's only repeated twice, it might not be worth it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You had me at "optional". I'll leave it as is for now.

@schmidt-sebastian
Copy link
Contributor Author

Adding @wilhuff for Owners.

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 Aug 21, 2018
@schmidt-sebastian schmidt-sebastian merged commit 813a174 into master Aug 21, 2018
@schmidt-sebastian schmidt-sebastian deleted the mrschmidt-speedupfieldpathtests branch September 5, 2018 18:22
@firebase firebase locked and limited conversation to collaborators Oct 17, 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