[video_player_android] Give can pause integration test range to test for#7913
[video_player_android] Give can pause integration test range to test for#7913camsim99 merged 10 commits intoflutter:mainfrom
can pause integration test range to test for#7913Conversation
|
If we are ok with this approach, I can file a Github issue to find a longterm solution. Hoping to unblock the tree right now. |
matanlurey
left a comment
There was a problem hiding this comment.
We should not update the CHANGELOG or verison when updating an integration test - it is not part of the public API or implementation details of the package itself.
| expect(await player.getPosition(textureId), pausedDuration); | ||
| // TODO(camsim99): Implement reliable way to tell when pausing completes | ||
| // to check for exact pausedDuration. | ||
| expect((await player.getPosition(textureId)).inMilliseconds, inInclusiveRange(pausedDuration.inMilliseconds, pausedDuration.inMilliseconds + 500)); |
There was a problem hiding this comment.
I am legit confused why this is necessary, the original code (before the refactor) read:
await controller.initialize();
// Play for a second, then pause, and then wait a second.
await controller.play();
await tester.pumpAndSettle(_playDuration);
await controller.pause();
await tester.pumpAndSettle(_playDuration);
final Duration pausedPosition = (await controller.position)!;
await tester.pumpAndSettle(_playDuration);
// Verify that we stopped playing after the pause.
expect(await controller.position, pausedPosition);Maybe that intermediate pumpAndSettle is necessary?
There was a problem hiding this comment.
Ah I didn't realize we removed one! Added it back to see.
There was a problem hiding this comment.
Thank you! That was my bad as well, I wish there was an easy to way run a test 100 times.
|
Once the tests pass, I will land this on red to fix the tree @stuartmorgan |
flutter/packages@5e03bb1...a556f0f 2024-10-24 10687576+bparrishMines@users.noreply.github.com [camera] Manual roll and skip failing tests (flutter/packages#7891) 2024-10-23 49699333+dependabot[bot]@users.noreply.github.com [image_picker]: Bump androidx.annotation:annotation from 1.8.2 to 1.9.0 in /packages/image_picker/image_picker_android/android (flutter/packages#7898) 2024-10-23 49699333+dependabot[bot]@users.noreply.github.com [url_launcher]: Bump androidx.annotation:annotation from 1.8.2 to 1.9.0 in /packages/url_launcher/url_launcher_android/android (flutter/packages#7906) 2024-10-23 48524817+wamynobe@users.noreply.github.com [pigeon] Allows swift generator to skip error class generation (flutter/packages#7849) 2024-10-23 49699333+dependabot[bot]@users.noreply.github.com [in_app_pur]: Bump androidx.annotation:annotation from 1.8.2 to 1.9.0 in /packages/in_app_purchase/in_app_purchase_android/android (flutter/packages#7903) 2024-10-23 49699333+dependabot[bot]@users.noreply.github.com [file_selector]: Bump androidx.annotation:annotation from 1.8.2 to 1.9.0 in /packages/file_selector/file_selector_android/android (flutter/packages#7900) 2024-10-23 43054281+camsim99@users.noreply.github.com [video_player_android] Give `can pause` integration test range to test for (flutter/packages#7913) 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 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
Gives the
can pauseintegration test some leeway since there seems to be lag between the time the video player is paused on the Dart side and when it is actually paused on the native side.Fixes flutter/flutter#157307.
Pre-launch Checklist
dart format.)[shared_preferences]pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.mdto add a description of the change, following repository CHANGELOG style, or this PR is exempt from CHANGELOG changes.///).