-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[video_player_android] Give can pause
integration test range to test for
#7913
Conversation
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. |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I didn't realize we removed one! Added it back to see.
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.
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 pause
integration 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.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.///
).