workflow-kotlin icon indicating copy to clipboard operation
workflow-kotlin copied to clipboard

UI Test shards are flaky, perhaps interfering with each other?

Open rjrjr opened this issue 2 years ago • 2 comments
trafficstars

We all know that our UI shards have gotten unbearably flaky again, but are having trouble articulating exactly what the symptoms are. This time around it feels less lack bad espresso code and more like infrastructure, for what that's worth.

Let's use the issue to take notes each time we're afflicted and see if we can tease out a pattern.

rjrjr avatar Sep 05 '23 22:09 rjrjr

For example, #1105 added a new test class but did not invoke it. Making no changes to code that would be executed in CI. But yet the instrumentation shards all failed? Such as https://github.com/square/workflow-kotlin/actions/runs/6051263654.

We have no idea why they fail - but they look like legit timeouts on espresso, so are the emulators freezing/lagging?

steve-the-edwards avatar Sep 06 '23 18:09 steve-the-edwards

Maybe we have some good old espresso root matcher issues? Maybe a system dialog was popped? This would be easier to dig into if we had screen grabs or video. And if I had a pony.

com.squareup.workflow1.ui.container.BackStackContainerPersistenceLifecycleTest > restores_view_on_pop_after_config_change[test(AVD) - 10] FAILED 
	androidx.test.espresso.base.RootViewPicker$RootViewWithoutFocusException: Waited for the root of the view hierarchy to have window focus and not request layout for 10 seconds. If you specified a non default root matcher, it may be picking a root that never takes focus. Root:
	Root{application-window-token=android.view.ViewRootImpl$W@8a45edf, window-token=android.view.ViewRootImpl$W@8a45edf, has-window-focus=false, layout-params-type=1, layout-params-string={(0,0)(fillxfill) sim={forwardNavigation} ty=BASE_APPLICATION wanim=0x10302fe

rjrjr avatar Oct 13 '23 17:10 rjrjr