Skip to content

[video_player] Try to address test flake - #6899

Merged
auto-submit[bot] merged 3 commits into
flutter:mainfrom
stuartmorgan-g:video-player-flake
Jun 10, 2024
Merged

[video_player] Try to address test flake#6899
auto-submit[bot] merged 3 commits into
flutter:mainfrom
stuartmorgan-g:video-player-flake

Conversation

@stuartmorgan-g

Copy link
Copy Markdown
Collaborator

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.

Fixesflutter/flutter#86915

Pre-launch Checklist

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.
Fixesflutter/flutter#86915
@stuartmorgan-g

Copy link
Copy Markdown
CollaboratorAuthor

Since this is speculative I'll re-run the presubmit tests a few times at least to get better signal.

@bparrishMinesbparrishMines left a comment

Copy link
Copy Markdown
Contributor

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) {

Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
CollaboratorAuthor

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.

@stuartmorgan-gstuartmorgan-g added autosubmit Merge PR when tree becomes green via auto submit App emergency Override tree-status signal (land even with closed tree), combine with the autosubmit label. labels Jun 10, 2024
@stuartmorgan-g

Copy link
Copy Markdown
CollaboratorAuthor

I'm going to land this on red because so much of the red today has been one of these two tests flaking.

@auto-submit
auto-submitBot merged commit 61ed839 into flutter:mainJun 10, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 11, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 11, 2024
auto-submitBot pushed a commit to flutter/flutter that referenced this pull request Jun 12, 2024
flutter/packages@e95fe4a...8c24fd4
2024-06-11 engine-flutter-autoroll@skia.org Roll Flutter from 32081aa to 14df7be (21 revisions) (flutter/packages#6907)
2024-06-11 luthien256@gmail.com Ensure each code block specified in the markdown uses its own ScrollController. (flutter/packages#6904)
2024-06-10 stuartmorgan@google.com [video_player] Try to address test flake (flutter/packages#6899)
2024-06-10 stuartmorgan@google.com [ci] Allow `platform` references (flutter/packages#6903)
2024-06-10 magder@google.com Change CODEOWNERS for metrics_center (flutter/packages#6892)
2024-06-10 mit@google.com Remove package:platform source (flutter/packages#6898)
2024-06-10 engine-flutter-autoroll@skia.org 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 flutter-ecosystem@google.com,rmistry@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
victorsanni pushed a commit to victorsanni/flutter that referenced this pull request Jun 14, 2024
flutter/packages@e95fe4a...8c24fd4
2024-06-11 engine-flutter-autoroll@skia.org Roll Flutter from 32081aa to 14df7be (21 revisions) (flutter/packages#6907)
2024-06-11 luthien256@gmail.com Ensure each code block specified in the markdown uses its own ScrollController. (flutter/packages#6904)
2024-06-10 stuartmorgan@google.com [video_player] Try to address test flake (flutter/packages#6899)
2024-06-10 stuartmorgan@google.com [ci] Allow `platform` references (flutter/packages#6903)
2024-06-10 magder@google.com Change CODEOWNERS for metrics_center (flutter/packages#6892)
2024-06-10 mit@google.com Remove package:platform source (flutter/packages#6898)
2024-06-10 engine-flutter-autoroll@skia.org 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 flutter-ecosystem@google.com,rmistry@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
victorsanni pushed a commit to victorsanni/flutter that referenced this pull request Jun 14, 2024
flutter/packages@e95fe4a...8c24fd4
2024-06-11 engine-flutter-autoroll@skia.org Roll Flutter from 32081aa to 14df7be (21 revisions) (flutter/packages#6907)
2024-06-11 luthien256@gmail.com Ensure each code block specified in the markdown uses its own ScrollController. (flutter/packages#6904)
2024-06-10 stuartmorgan@google.com [video_player] Try to address test flake (flutter/packages#6899)
2024-06-10 stuartmorgan@google.com [ci] Allow `platform` references (flutter/packages#6903)
2024-06-10 magder@google.com Change CODEOWNERS for metrics_center (flutter/packages#6892)
2024-06-10 mit@google.com Remove package:platform source (flutter/packages#6898)
2024-06-10 engine-flutter-autoroll@skia.org 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 flutter-ecosystem@google.com,rmistry@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
creatorpiyush pushed a commit to creatorpiyush/packages that referenced this pull request Jun 10, 2026
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.
Fixesflutter/flutter#86915
bisor0627 pushed a commit to bisor0627/packages that referenced this pull request Jun 19, 2026
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.
Fixesflutter/flutter#86915
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmitMerge PR when tree becomes green via auto submit AppemergencyOverride tree-status signal (land even with closed tree), combine with the autosubmit label.p: video_player

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[video_player] integration test is very flaky on iOS

2 participants

@stuartmorgan-g@bparrishMines