test(e2e): fix flaky list view tests on android - #708
Merged
Merged
Conversation
There was a problem hiding this comment.
Code Review
This pull request upgrades the google_sign_in dependency to version 7.1.0 and refactors GoogleProvider to use its new initialization and authentication APIs, including adding support for serverClientId. It also updates associated tests to match the new mock structures and replaces pump() with pumpAndSettle() in list view integration tests. Feedback on the changes highlights a potential null pointer exception if authenticate() returns null (e.g., when a user cancels), and suggests tracking and asserting initialization parameters to prevent silent configuration mismatches across multiple GoogleProvider instances due to the static _initialization future.
The Firestore "custom error handler" and Database "ignore errors" tests awaited the stream's first event, then pumped a single frame before asserting. A platform-channel callback can land a frame late when the emulator is slow on the Android emulator runner, so the finder saw nothing and the android e2e job failed intermittently. pumpAndSettle matches what the neighbouring database error-handler test already does, and both end states are static (a Text, an empty ListView) so it settles rather than spinning on the progress indicator.
demolaf
force-pushed
the
fix/flaky-list-view-e2e
branch
from
September 23, 2026 09:17
2a4f8c7 to
415807c
Compare
11 tasks
russellwheatley
approved these changes
Sep 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Both tests await a Firebase stream's first event and then pump a single frame before asserting. One frame is not enough when the platform-channel callback lands late on the Android emulator runner, so the
androide2e job intermittently fails withFound 0 widgets.Changes
firestore_list_view_test.dart: "Allows specifying custom error handler" awaitspumpAndSettle()instead of a singlepump().database_list_view_test.dart: same for "By default, ignore errors".Why pumpAndSettle does not hang
Once the error lands,
isFetchinggoes false and the builder returns the errorText, so the animating progress indicator is gone and no frames stay scheduled. The database error-handler test above already usespumpAndSettle()for this same pattern.Verification
melos run analyzeis clean. These need the emulator, so the real signal is theandroide2e job on this PR.