-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Fix abstract_method_smoke_test flakiness #42454
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
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie. Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
The flake appears to be coming from the Google Maps plugin. This test just needs a platform view plugin without the interface method implemented in general, not Maps specifically. Update it here to avoid the issue in Maps until that's fixed.
dnfield
left a comment
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.
LGTM!
|
Hmm. Is there a way to tell the analyzer to ignore an "invalid" dependency? I'm deliberately using an outdated version of ETA: I "fixed" this by temporarily locally patching |
This was done by locally patching `update_packages.dart` to have a new manually pinned dependency on webview_flutter: 0.3.9+1.
Codecov Report
@@ Coverage Diff @@
## master #42454 +/- ##
=========================================
- Coverage 60.37% 59.68% -0.7%
=========================================
Files 194 194
Lines 18849 18849
=========================================
- Hits 11381 11250 -131
- Misses 7468 7599 +131
Continue to review full report at Codecov.
|
|
🤦♂️ I forgot that there was a webview bug in this version that was fixed in later versions, https://firebase.corp.google.com/u/0/project/flutter-infra/testlab/histories/bh.1b29258e8f97b976/matrices/8877227498452021020/executions/bs.32007b1eae22dd0. I'm going to just rewrite this to use a custom platform view that does nothing. Sorry about the back and forth. |
Before, the test was depending on a specific package version that demonstrated the potential bug. However the flutter analyzer demands updated package versions and we'd need to work around it here to keep the version in sync. In addition to that the old package version itself had a different bug in addition to the previous bug this patch is avoiding from the _other_ package that previously caused the test to fail in CI. The newer version of the package without the bug also didn't exercise the right code path to make this test meaningful. Create a very simple platform view implementation that exercises this potential bug in order to create a minimal test case with less risk of causing second order issues like depending on any kind of full package would cause.
| view.setBackgroundColor(Color.CYAN) | ||
| } | ||
|
|
||
| override fun dispose() {} |
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.
not sure if the empty dispose() is needed, but just in case.
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.
Hard to tell in Kotlin, but the original class is a Java interface so it's still needed here.
|
LGTM. Thanks for the effort to track this down :) |
The flake appears to be coming from the Google Maps plugin. This test just needs a platform view plugin without the interface method implemented in general, not Maps specifically. Update it here to avoid the issue in Maps until that's fixed. Create a very simple platform view implementation that exercises this potential bug in order to create a minimal test case with less risk of causing second order issues like depending on any kind of full package would cause.
Description
The flake appears to be coming from the Google Maps plugin. This test
just needs a platform view plugin without the interface method
implemented in general, not Maps specifically. Update it here to avoid
the issue in Maps until that's fixed.
Create a very simple platform view implementation that exercises this
potential bug in order to create a minimal test case with less risk of
causing second order issues like depending on any kind of full package
would cause.
Related Issues
Fixes #42349
See also #42451
Tests
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change
Does your PR require Flutter developers to manually update their apps to accommodate your change?