-
Notifications
You must be signed in to change notification settings - Fork 932
Firestore: improve persistence
parameter of integration tests to an object rather than a boolean
#7404
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
Conversation
|
Size Report 1Affected ProductsNo changes between base commit (f2fb56f) and merge commit (7e45723).Test Logs |
Size Analysis Report 1Affected ProductsNo changes between base commit (f2fb56f) and merge commit (7e45723).Test Logs |
…ralization [no actions]
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.
Beautiful! LGTM.
All of Firestore's integration tests are parameterized with a
persistence
boolean:true
means to use indexeddb persistence with lru gc andfalse
means to use memory persistence with eager gc.But as of #6943 we now support memory persistence with lru gc. Some tests (specifically,
resuming a query should use bloom filter to avoid full requery
, which is undergoing this change in #7401) can take advantage of this new persistence mode so that it can be run with both memory and indexeddb persistence. However, the integration testing helper methods only use true/false as the persistence mode.This PR generalizes the "persistence mode" from a boolean to a
PersistenceMode
object. This is mostly transparent to the tests as they mostly just "pass through" thepersistence
argument without really caring about its value. However, they were strongly typed asboolean
. In this PR the tests were updated to basically ignore the type of thepersistence
argument, except where it mattered.