This repository was archived by the owner on Feb 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[video_player] Fix a flaky test #4611
Merged
stuartmorgan-g
merged 3 commits into
flutter:master
from
stuartmorgan-g:video-test-buffer-simplification
Dec 13, 2021
Merged
[video_player] Fix a flaky test #4611
stuartmorgan-g
merged 3 commits into
flutter:master
from
stuartmorgan-g:video-test-buffer-simplification
Dec 13, 2021
Conversation
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
This test is flaking in a way that doesn't seem like it should be possible, since the bool whose value is incorrect is only set in one place, and its the same place where the future being awaited just before is completed. While the cause of the flake isn't understood, it's odd to have duplicate ways of expressing the same thing in the test in the first place, so this removes the booleans entirely and uses the completers directly. This may or may not fix the flake (since we don't understand how it's possible to flake), but it simplifies the test, and if it still fails we may get a less confusing failure mode. Part of flutter/flutter#94775
ditman
approved these changes
Dec 13, 2021
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.
As discussed on Discord. LGTM!
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Dec 13, 2021
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Dec 20, 2021
KyleFin
pushed a commit
to KyleFin/plugins
that referenced
this pull request
Dec 21, 2021
The 'reports buffering status' test was written in an unnecessary complicated way that used pairs of completers and booleans that tracked the same thing, and more importantly had a bug (hidden by the fact that this package is still on legacy analysis options) where the `await` statements weren't actually doing anything, because they were not actually `await`ing futures. This fixes the lack of awaits—which should fix the flake—and removes the unnecessary booleans. Fixes flutter/flutter#94775
stuartmorgan-g
added a commit
to stuartmorgan-g/plugins
that referenced
this pull request
Feb 10, 2022
Switches from legacy analysis options to current analysis options, fixing all analysis issues it exposed. Also fixes a flaky test; the strict options highlighted that another test was still using the same broken pattern that was found and fixed in flutter#4611 Part of flutter/flutter#76229
stuartmorgan-g
added a commit
to stuartmorgan-g/plugins
that referenced
this pull request
Feb 10, 2022
Switches from legacy analysis options to current analysis options, fixing all analysis issues it exposed. Also fixes a flaky test; the strict options highlighted that another test was still using the same broken pattern that was found and fixed in flutter#4611 Part of flutter/flutter#76229
11 tasks
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 'reports buffering status' test was written in an unnecessary complicated way that used pairs of completers and booleans that tracked the same thing, and more importantly had a bug (hidden by the fact that this package is still on legacy analysis options) where the
await
statements weren't actually doing anything, because they were not actuallyawait
ing futures.This fixes the lack of awaits—which should fix the flake—and removes the unnecessary booleans.
Fixes flutter/flutter#94775
Pre-launch Checklist
dart format
.)[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.md
to add a description of the change, following repository CHANGELOG style.///
).