Skip to content
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] Skip flaky tests in certain circumstances on Android #5872

Merged

Conversation

stuartmorgan
Copy link
Contributor

Temporary workaround for flutter/flutter#141145

This doesn't fully skip the test because this problem doesn't happen in CI device tests or locally, so rather than totally lose coverage this detects the very specific markers of this flake and skips only when that happens. This should allow the tree to stop being so red with the minimal coverage loss while we investigate this further.

Part of flutter/flutter#141145

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the relevant style guides and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use dart format.)
  • I signed the CLA.
  • The title of the PR starts with the name of the package surrounded by square brackets, e.g. [shared_preferences]
  • I listed at least one issue that this PR fixes in the description above.
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.
  • I updated CHANGELOG.md to add a description of the change, following repository CHANGELOG style.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@stuartmorgan stuartmorgan marked this pull request as draft January 11, 2024 18:21
@stuartmorgan
Copy link
Contributor Author

Looks like this isn't working; need to experiment more to see why. Things that don't repro locally are the worst.

@stuartmorgan stuartmorgan force-pushed the video-player-android-conditional-skip branch from 73fda4c to 3275177 Compare January 11, 2024 20:04
@stuartmorgan
Copy link
Contributor Author

Looks like this isn't working; need to experiment more to see why

Captured what I found here and relaxed the check accordingly. This should work now; it's slightly less targeted unfortunately.

@stuartmorgan stuartmorgan marked this pull request as ready for review January 11, 2024 20:26
@stuartmorgan
Copy link
Contributor Author

@reidbaker This should be working now, so it ready for review.

@stuartmorgan stuartmorgan changed the title [video_player Skip flaky tests in certain circumstances on Android [video_player] Skip flaky tests in certain circumstances on Android Jan 11, 2024
Copy link
Contributor

@reidbaker reidbaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another option would be to try to call the dismiss dialog call in this situation instead of skipping.

@stuartmorgan
Copy link
Contributor Author

Another option would be to try to call the dismiss dialog call in this situation instead of skipping.

The reason I didn't do that is that unlike the other cases, this is a Dart integration test, which means it's running in the actual example app, with no special native code. So to dismiss the dialog (if we even can—it wasn't 100% clear to me from initial research if we could do from a normal app with a special permission set in the app, or if it was now fully locked down) we would need to build native code to do that, and a method channel to call it from Dart, into the example app, which is a lot more code to write for what I hope will be a temporary hack.

@stuartmorgan stuartmorgan added the autosubmit Merge PR when tree becomes green via auto submit App label Jan 11, 2024
@auto-submit auto-submit bot merged commit b61735b into flutter:main Jan 11, 2024
80 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jan 12, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Jan 12, 2024
flutter/packages@0744fe6...d74d687

2024-01-12 stuartmorgan@google.com [ci] Check repo-level package metadata (flutter/packages#5811)
2024-01-12 stuartmorgan@google.com [various] Add iOS privacy manifests (flutter/packages#5846)
2024-01-11 stuartmorgan@google.com [video_player] Skip flaky tests in certain circumstances on Android (flutter/packages#5872)
2024-01-11 engine-flutter-autoroll@skia.org Roll Flutter (stable) from 78666c8 to 46787ee (5 revisions) (flutter/packages#5870)
2024-01-11 engine-flutter-autoroll@skia.org Roll Flutter from b840a60 to 9f2e681 (24 revisions) (flutter/packages#5871)

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
@reidbaker reidbaker mentioned this pull request Jan 12, 2024
sybrands-place pushed a commit to sybrands-place/packages that referenced this pull request Jan 16, 2024
* main: (186 commits)
  Roll Flutter from 7dc856a to 1a2c315 (23 revisions) (flutter#5895)
  [webview_flutter_android] Add test that `onReceivedHttpAuthRequest` is cancelled by default  (flutter#5723)
  Roll Flutter (stable) from 46787ee49c1f to ef1af02aead6 (1 revision) (flutter#5887)
  [google_maps_flutter] Drop iOS 11 support (flutter#5873)
  Roll Flutter from 9f2e681 to 7dc856a (15 revisions) (flutter#5882)
  [ci] Check repo-level package metadata (flutter#5811)
  [various] Add iOS privacy manifests (flutter#5846)
  [video_player] Skip flaky tests in certain circumstances on Android (flutter#5872)
  Roll Flutter (stable) from 78666c8dc57e to 46787ee49c1f (5 revisions) (flutter#5870)
  Roll Flutter from b840a60 to 9f2e681 (24 revisions) (flutter#5871)
  [quick_actions_android] Close system dialogs for integration test (flutter#5853)
  [file_selector]: Bump androidx.annotation:annotation from 1.7.0 to 1.7.1 in /packages/file_selector/file_selector_android/android (flutter#5712)
  [in_app_pur]: Bump androidx.annotation:annotation from 1.7.0 to 1.7.1 in /packages/in_app_purchase/in_app_purchase_android/android (flutter#5713)
  [url_launcher]: Bump androidx.annotation:annotation from 1.7.0 to 1.7.1 in /packages/url_launcher/url_launcher_android/android (flutter#5708)
  [image_picker]: Bump androidx.annotation:annotation from 1.7.0 to 1.7.1 in /packages/image_picker/image_picker_android/android (flutter#5703)
  Roll Flutter from 126302d to b840a60 (29 revisions) (flutter#5855)
  Roll Flutter from c6ddb73 to 126302d (32 revisions) (flutter#5852)
  Bump github/codeql-action from 3.22.12 to 3.23.0 (flutter#5849)
  Re-land: Enable prefer_mixin and bump plugin_platform_interface to 2.1.7 (flutter#5841)
  [ci] Exclude quick_actions from Android emulators (flutter#5847)
  ...

# Conflicts:
#	packages/webview_flutter/webview_flutter_wkwebview/ios/Classes/FWFNavigationDelegateHostApi.m
arc-yong pushed a commit to Arctuition/packages-arc that referenced this pull request Jun 14, 2024
…lutter#5872)

Temporary workaround for flutter/flutter#141145

This doesn't fully skip the test because this problem doesn't happen in CI device tests or locally, so rather than totally lose coverage this detects the very specific markers of this flake and skips only when that happens. This should allow the tree to stop being so red with the minimal coverage loss while we investigate this further.

Part of flutter/flutter#141145
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App p: video_player
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants