Bug 210991 - [iOS] Always run WKTR's WKWebViews at foreground priority
Summary: [iOS] Always run WKTR's WKWebViews at foreground priority
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-04-24 13:28 PDT by Chris Dumez
Modified: 2020-04-25 17:49 PDT (History)
8 users (show)

See Also:


Attachments
Patch (1.84 KB, patch)
2020-04-24 13:29 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2020-04-24 13:28:33 PDT
Always run WKTR's WKWebViews at foreground priority. This makes sure that they don't suspend and run at foreground priority on iOS, even if those views are not visible on screen.
This is an issue to address flakiness on the bots.
Comment 1 Chris Dumez 2020-04-24 13:29:25 PDT
Created attachment 397496 [details]
Patch
Comment 2 Keith Miller 2020-04-24 13:36:48 PDT
Comment on attachment 397496 [details]
Patch

r=me
Comment 3 EWS 2020-04-24 15:29:47 PDT
Committed r260675: <https://trac.webkit.org/changeset/260675>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 397496 [details].
Comment 4 Radar WebKit Bug Importer 2020-04-24 15:30:24 PDT
<rdar://problem/62344052>
Comment 5 Alexey Proskuryakov 2020-04-25 17:30:28 PDT
Now I'm curious if this reduced the flakiness, and how WKTR's view could be invisible in the first place.
Comment 6 Chris Dumez 2020-04-25 17:49:13 PDT
(In reply to Alexey Proskuryakov from comment #5)
> Now I'm curious if this reduced the flakiness, and how WKTR's view could be
> invisible in the first place.

Well, the plan is the monitor the known flaky tests on iOS and see. How can the views be not visible? I have a couple of theories:
- we are using simulators, sometimes multiple ones to run tests in parallel. How do we know all simulators are visible? E.g can one simulator be on top of another?
- some tests open new windows but on iOS we normally only display only 1 window at a time on screen.
- we may have issues determining visibility accurately in the simulator.


I will note that we disabled suspension for api tests on iOS about a year ago and it definitely addressed some of the flakiness that we were seeing. We did so by lying and saying that the views were visible at all times.

In any case, I will monitor tests with this change and I plan to look into tests that seem to have become flaky after adopting running board assertion to identify why next week.