Stabilize QuickAccessDialogTest by warming lazy providers in setUp#4113
Open
vogella wants to merge 1 commit into
Open
Stabilize QuickAccessDialogTest by warming lazy providers in setUp#4113vogella wants to merge 1 commit into
vogella wants to merge 1 commit into
Conversation
Contributor
ca6e206 to
20f83c3
Compare
The UI-requiring quick access providers (commands, preferences, actions, contributed computers, ...) are constructed and queried lazily on the first non-empty filter. That first query runs each provider on the UI thread and can block it for many seconds on a cold workbench. The setUp warmup only opened the dialog with an empty filter, which skips those providers, so the one-time initialization landed inside whichever test typed the first filter and could exceed its timed wait. On a slow macOS runner this froze the UI thread for about 28s and timed out testPreviousChoicesAvailableForExtension with an empty table. Type a real filter on the warmup dialog and wait for results so the cold initialization happens during setUp, outside any timed assertion. Every subsequent query then hits the warm, fast path. Addresses eclipse-platform#4009
20f83c3 to
b7f3490
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The UI-requiring quick access providers are constructed and queried lazily on the first non-empty filter, and that first query runs them on the UI thread. On a cold workbench it can block for many seconds (about 28s on a slow macOS runner), and because the setUp warmup only used an empty filter (which skips those providers), that one-time cost landed inside whichever test typed the first filter and exceeded its timed wait, leaving the table empty.
This warms the providers with a real filter during setUp, so the slow first query runs outside any timed assertion and every test sees the warm, fast path. Test-only change; the lazy provider construction in production is unchanged.
Addresses #4009