-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[video_player] Try to address test flake #6899
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
This attempts to address two sources of flake: - A test that playing doesn't continue past the duration flakily fails, at least on Android, with a position a small amount past the duration. This seems like an unexpected library behavior that we wouldn't want to expose to clients, so rather than change the test, this makes the logic that updates the `Value` clamp the position to the duration. - A test that asset videos play has been restructured to actually wait for the future that should start playing to complete before checking whether it's playing. The test was previously not actually waiting for anything other than animations to complete, and there's no reason the placeholder layout couldn't have completed before the asset loaded. The fact that the test was already disabled for iOS is strong evidence that the flake we are seeing on Android is a problem with the test itself, so hopefully this addresses both platforms. Fixes flutter/flutter#86915
Since this is speculative I'll re-run the presubmit tests a few times at least to get better signal. |
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.
LGTM
// The underlying native implementation on some platforms sometimes reports | ||
// a position slightly past the reported max duration. Clamp to the duration | ||
// to insulate clients from this behavior. | ||
if (position.compareTo(value.duration) > 0) { |
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.
nit: Would this not be easier to read as position > value.duration
.
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.
Weird, for some reason I thought that didn't work. Yes, definitely much better that way.
I'm going to land this on red because so much of the red today has been one of these two tests flaking. |
flutter/packages@e95fe4a...8c24fd4 2024-06-11 [email protected] Roll Flutter from 32081aa to 14df7be (21 revisions) (flutter/packages#6907) 2024-06-11 [email protected] Ensure each code block specified in the markdown uses its own ScrollController. (flutter/packages#6904) 2024-06-10 [email protected] [video_player] Try to address test flake (flutter/packages#6899) 2024-06-10 [email protected] [ci] Allow `platform` references (flutter/packages#6903) 2024-06-10 [email protected] Change CODEOWNERS for metrics_center (flutter/packages#6892) 2024-06-10 [email protected] Remove package:platform source (flutter/packages#6898) 2024-06-10 [email protected] Roll Flutter from fc19ecf to 32081aa (9 revisions) (flutter/packages#6896) 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 [email protected],[email protected] 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 attempts to address two sources of flake: - A test that playing doesn't continue past the duration flakily fails, at least on Android, with a position a small amount past the duration. This seems like an unexpected library behavior that we wouldn't want to expose to clients, so rather than change the test, this makes the logic that updates the `Value` clamp the position to the duration. - A test that asset videos play has been restructured to actually wait for the future that should start playing to complete before checking whether it's playing. The test was previously not actually waiting for anything other than animations to complete, and there's no reason the placeholder layout couldn't have completed before the asset loaded. The fact that the test was already disabled for iOS is strong evidence that the flake we are seeing on Android is a problem with the test itself, so hopefully this addresses both platforms. Fixes flutter/flutter#86915
flutter/packages@e95fe4a...8c24fd4 2024-06-11 [email protected] Roll Flutter from 32081aa to 14df7be (21 revisions) (flutter/packages#6907) 2024-06-11 [email protected] Ensure each code block specified in the markdown uses its own ScrollController. (flutter/packages#6904) 2024-06-10 [email protected] [video_player] Try to address test flake (flutter/packages#6899) 2024-06-10 [email protected] [ci] Allow `platform` references (flutter/packages#6903) 2024-06-10 [email protected] Change CODEOWNERS for metrics_center (flutter/packages#6892) 2024-06-10 [email protected] Remove package:platform source (flutter/packages#6898) 2024-06-10 [email protected] Roll Flutter from fc19ecf to 32081aa (9 revisions) (flutter/packages#6896) 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 [email protected],[email protected] 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
flutter/packages@e95fe4a...8c24fd4 2024-06-11 [email protected] Roll Flutter from 32081aa to 14df7be (21 revisions) (flutter/packages#6907) 2024-06-11 [email protected] Ensure each code block specified in the markdown uses its own ScrollController. (flutter/packages#6904) 2024-06-10 [email protected] [video_player] Try to address test flake (flutter/packages#6899) 2024-06-10 [email protected] [ci] Allow `platform` references (flutter/packages#6903) 2024-06-10 [email protected] Change CODEOWNERS for metrics_center (flutter/packages#6892) 2024-06-10 [email protected] Remove package:platform source (flutter/packages#6898) 2024-06-10 [email protected] Roll Flutter from fc19ecf to 32081aa (9 revisions) (flutter/packages#6896) 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 [email protected],[email protected] 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 attempts to address two sources of flake:
Value
clamp the position to the duration.Fixes flutter/flutter#86915
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, or this PR is exempt from CHANGELOG changes.///
).