-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[webview_flutter_android] Fix timeouts in the integration tests #6857
[webview_flutter_android] Fix timeouts in the integration tests #6857
Conversation
Can you elaborate on what the race is exactly? The PR mentions |
I tried to find a clever solution, but ultimately just gave up. The problem is that these tests are using My initial solution in 1d8ee9c just moved the My second solution in c3458ac removed the Finally, I just gave up and switched to completers. Edit: |
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 missed that they were broadcast streams. Thanks for the explanation, LGTM!
Looks like the iOS package and the app-facing package have the same test structure, so we should be sure those get updated as well. |
* 5f62d21eb [local_auth] Fix failed biometric authentication not throwing error (flutter/plugins#6821) * ca974ab0c [webview_flutter_web] Copies web implementation of webview_flutter from v4_webview (flutter/plugins#6854) * 4d11be416 [image_picker] Don't store null paths in lost cache (flutter/plugins#6678) * fd2841fd0 [webview_flutter_android] Fix timeouts in the integration tests (flutter/plugins#6857) * abc9f9a9b [flutter_plugin_tools] If `clang-format` does not run, fall back to other executables in PATH (flutter/plugins#6853) * 7efb5e89d [video_player] Add compatibility with the current platform interface (flutter/plugins#6855) * 32dcbf3e3 [image_picker] Improve image_picker for iOS to handle more image types (flutter/plugins#6812) * 840a04954 [webview_flutter] Copies app-facing implementation of webview_flutter from v4_webview (flutter/plugins#6856)
…#117314) * 5f62d21eb [local_auth] Fix failed biometric authentication not throwing error (flutter/plugins#6821) * ca974ab0c [webview_flutter_web] Copies web implementation of webview_flutter from v4_webview (flutter/plugins#6854) * 4d11be416 [image_picker] Don't store null paths in lost cache (flutter/plugins#6678) * fd2841fd0 [webview_flutter_android] Fix timeouts in the integration tests (flutter/plugins#6857) * abc9f9a9b [flutter_plugin_tools] If `clang-format` does not run, fall back to other executables in PATH (flutter/plugins#6853) * 7efb5e89d [video_player] Add compatibility with the current platform interface (flutter/plugins#6855) * 32dcbf3e3 [image_picker] Improve image_picker for iOS to handle more image types (flutter/plugins#6812) * 840a04954 [webview_flutter] Copies app-facing implementation of webview_flutter from v4_webview (flutter/plugins#6856)
…ter#6857) * fix timeouts * remove broadcast instead * just use completers like a lame person
Fixes timeouts caused by a race condition when loading a page. In pre-4.0 webview_flutter, the widget was passed the initial url, so we were able to call
await pageLoads.stream.first;
before the page was loaded.However, these tests would load the url before we could call
await pageLoads.stream.first;
, leading to a timeout.This could also be responsible for the test crashes, but I'll keep an eye on the CI to make sure.
Edit: Tests passed first time, so this could be the only fixed needed!
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.///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.