Skip to content

[video_player] Skip flaky tests in certain circumstances on Android #5872

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

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,18 @@ void main() {
await controller.seekTo(tenMillisBeforeEnd);
await controller.play();
await tester.pumpAndSettle(_playDuration);
// Android emulators in our CI have frequent flake where the video
// reports as still playing (usually without having advanced at all
// past the seek position, but sometimes having advanced some); if that
// happens, the thing being tested hasn't even had a chance to happen
// due to CI issues, so just report it as skipped.
// TODO(stuartmorgan): Remove once
// https://github.com/flutter/flutter/issues/141145 is fixed.
if ((!kIsWeb && Platform.isAndroid) && controller.value.isPlaying) {
markTestSkipped(
'Skipping due to https://github.com/flutter/flutter/issues/141145');
return;
}
expect(controller.value.isPlaying, false);
expect(controller.value.position, controller.value.duration);

Expand All @@ -157,6 +169,18 @@ void main() {
controller.value.duration - const Duration(milliseconds: 10));
await controller.play();
await tester.pumpAndSettle(_playDuration);
// Android emulators in our CI have frequent flake where the video
// reports as still playing (usually without having advanced at all
// past the seek position, but sometimes having advanced some); if that
// happens, the thing being tested hasn't even had a chance to happen
// due to CI issues, so just report it as skipped.
// TODO(stuartmorgan): Remove once
// https://github.com/flutter/flutter/issues/141145 is fixed.
if ((!kIsWeb && Platform.isAndroid) && controller.value.isPlaying) {
markTestSkipped(
'Skipping due to https://github.com/flutter/flutter/issues/141145');
return;
}
expect(controller.value.isPlaying, false);
expect(controller.value.position, controller.value.duration);

Expand Down