Uh oh!
There was an error while loading. Please reload this page.
[camera]fix test flake due to expectation fulfilled before flag is toggled - #12400
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates several mock camera stubs in CameraPluginDelegatingMethodTests.swift to set their respective state tracking flags before invoking their completion handlers. There are no review comments, and I have no additional feedback to provide.
stuartmorgan-g
approved these changes
Aug 10, 2026
stuartmorgan-g
left a comment
Collaborator
There was a problem hiding this comment.
LGTM
(It'll be nice when this is converted to Swift Testing, where we will just return a value from each async block directly.)
Uh oh!
There was an error while loading. Please reload this page.
pullBot
pushed a commit
to Klomgor/flutter
that referenced
this pull request
Aug 11, 2026
…r#190923) flutter/packages@1861b68...aaaf246 2026-08-10 jmccandless@google.com [cupertino_ui] Main example (flutter/packages#12380) 2026-08-10 katelovett@google.com Update ci for + releases (flutter/packages#12419) 2026-08-10 engine-flutter-autoroll@skia.org Manual roll Flutter from b766512 to 27b0988 (29 revisions) (flutter/packages#12420) 2026-08-10 engine-flutter-autoroll@skia.org Manual roll Flutter from e52f01c to b766512 (42 revisions) (flutter/packages#12406) 2026-08-10 41930132+hellohuanlin@users.noreply.github.com [camera]fix test flake due to expectation fulfilled before flag is toggled (flutter/packages#12400) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC flutter-ecosystem@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
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 freeto 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.
The flake is due to
completionblock (which fulfills the expectation) being called too early, before the flag to test is actually toggledIt flakes (rather than consistently fails) because we toggle the flag on capture session queue, while the test runs on main, resulting in a race.
Also audited all camera tests to check for similar bugs.
List which issues are fixed by this PR. You must list at least one issue.
Fixesflutter/flutter#189108
Pre-Review Checklist
[shared_preferences]Comment: No version bump since it's test only
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.
Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the
gemini-code-assistbot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩↩2