-
Notifications
You must be signed in to change notification settings - Fork 624
Do not wait to store state when signing out #4490
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
Generated by 🚫 Danger |
Coverage Report 1Affected Products
Test Logs |
Size Report 1Affected Products
Test Logs |
9716d09
to
9afb4ba
Compare
Task<AppDistributionReleaseInternal> setCachedNewReleaseTask = | ||
firebaseAppDistribution.getCachedNewRelease().set(TEST_RELEASE_NEWER_AAB_INTERNAL); | ||
|
||
// Confirm that the cached new release is initially set |
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.
I'm not a big fan of this pattern - I think, in general, we should trust (but not verify) test setup.
In this case I think you should be able to drop this comment, the blank line above it, and the assert on line 528
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.
Sounds good. Removed.
|
||
// Sign out the tester | ||
firebaseAppDistribution.signOutTester(); | ||
awaitAsyncOperations(lightweightExecutor); |
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.
If I understand this change correctly, this should no be needed
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.
Ah you're right, great catch!
0b75061
to
ef1897a
Compare
Startup Time Report 1Note: Layout is sometimes suboptimal due to limited formatting support on GitHub. Please check this report on GCS. Startup time comparison between the CI merge commit (0b182c7) and the base commit (1a0858d) are not available. No macrobenchmark data found for the base commit (1a0858d). Analysis for the CI merge commit (0b182c7) can be found at: |
* Do not wait to store state when signing out * Remove unnecessary assertions during test setup
Neither task, either to set the cached release to null or to set the signed it status to false, can ever fail. And the order does not matter. So just kick them off so they can occur as quickly as possible. It's especially important for these changes to occur ASAP since
signOutTester()
returns immediately, and ideally we want the state to reflect that call immediately so the developer sees consistent behavior from the API.Also adds a new test.