-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Use Instrumentation.waitForIdleSync() after rotation requests. #51169
Use Instrumentation.waitForIdleSync() after rotation requests. #51169
Conversation
@@ -99,6 +101,7 @@ public void testPlatformViewRotate() throws Exception { | |||
intent.putExtra("scenario_name", "platform_view_rotate"); | |||
PlatformViewsActivity activity = activityRule.launchActivity(intent); | |||
activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); | |||
instrumentation.waitForIdleSync(); |
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.
Won't this be null?
I think what you actually want here is InstrumentationRegistry.getInstrumentation().waitForIdleSync()
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.
Done.
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.
(this one is still missing)
@@ -100,6 +102,7 @@ public void testPlatformViewRotate() throws Exception { | |||
intent.putExtra("scenario_name", "platform_view_rotate"); | |||
PlatformViewsActivity activity = activityRule.launchActivity(intent); | |||
activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); | |||
instrumentation.waitForIdleSync(); |
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.
Ditto here - but if you'd rather add a setup method for setting this I guess that's fine too
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.
Yeah oops, thought I had all of them. I would have tried it locally first but uh:
https://discord.com/channels/608014603317936148/608021010377080866/1214272920382210049
I think this is worth a try (once it's fixed to actually get an instance for all test cases), but I'm not 100% sure about how well the way Flutter renders will play with it. @adazh may know more - although I think the way Espresso solved this involved using the a11y tree and/or having callbacks fired from the framework/engine. |
…144570) flutter/engine@0d8588b...4001881 2024-03-04 matej.knopp@gmail.com Reland: [macOS] Use CVDisplayLink to drive repaint (flutter/engine#51126) 2024-03-04 jason-simmons@users.noreply.github.com Support gtest-parallel when running Impeller unit tests (flutter/engine#51079) 2024-03-04 matanlurey@users.noreply.github.com Scenario App: Adds a `run_{count}.{backend}.` file prefix to every run (on CI) (flutter/engine#51102) 2024-03-04 matanlurey@users.noreply.github.com Use Instrumentation.waitForIdleSync() after rotation requests. (flutter/engine#51169) 2024-03-04 skia-flutter-autoroll@skia.org Roll Skia from 9c7d13c05e77 to f65ecbdfb09c (1 revision) (flutter/engine#51170) 2024-03-04 dnfield@google.com Guard against API 22 (flutter/engine#51167) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC aaclarke@google.com,rmistry@google.com,zra@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
Fixes flutter/flutter#144553.
Looking roughly at:
... and given the fact it's only the rotation tests that seem especially flaky, let's give it a shot?
/cc @reidbaker @johnmccutchan if you have other advice.