-
Notifications
You must be signed in to change notification settings - Fork 625
Populate firebaseInstallationId field in session #4801
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
val sessionCoordinator = | ||
SessionCoordinator( | ||
firebaseInstallations = FakeFirebaseInstallations("FaKeFiD"), | ||
backgroundDispatcher = StandardTestDispatcher(testScheduler), |
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.
:integ-testing
doesn't have any test CoroutineDispatcher
s to work well with runTesting
.
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.
How does that impact us?
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.
:integ-testing
is to provide executors for testing that mimic the executors provided by firebase-common
with policies e.g. don't do blocking network requests on Background. See https://firebase.github.io/firebase-android-sdk/components/executors/#testing
So these tests don't mimic the Background policy. I tried to use TestOnlyExecutors.background().asCoroutineDispatcher()
when I first wrote this test, but then I couldn't call runCurrent()
to wait for the suspend functions to finish before doing the assert.
Coverage Report 1Affected Products
Test Logs |
Size Report 1Affected Products
Test Logs |
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 looks good!
Populate
firebaseInstallationId
field in session data.Add
SessionCoordinator
class and plumb in aCoroutineDispatcher
.Setup coroutines including testing.