diff --git a/packages/video_player/video_player/example/integration_test/video_player_test.dart b/packages/video_player/video_player/example/integration_test/video_player_test.dart index b6c592e54e2..d475a1ac5ef 100644 --- a/packages/video_player/video_player/example/integration_test/video_player_test.dart +++ b/packages/video_player/video_player/example/integration_test/video_player_test.dart @@ -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); @@ -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);