Fix flaky ResourceInitialSelectionTest on macOS#3831
Merged
vogella merged 1 commit intoeclipse-platform:masterfrom Mar 31, 2026
Merged
Fix flaky ResourceInitialSelectionTest on macOS#3831vogella merged 1 commit intoeclipse-platform:masterfrom
vogella merged 1 commit intoeclipse-platform:masterfrom
Conversation
Contributor
Test Results 852 files 852 suites 55m 43s ⏱️ Results for commit f0626c8. ♻️ This comment has been updated with latest results. |
… item count The previous fix waited for table.getItemCount() > 0 then slept for a fixed 5×50ms=250ms. This was unreliable because FilteredItemsSelectionDialog runs two refresh cycles: the first (from FilterHistoryJob) can produce a temporarily non-zero count with only history items before the initial selection is applied, and the second (from FilterJob) populates the actual results and applies the selection. On slower macOS CI runners the 250ms sleep expired before the second refresh cycle completed. Replace the fixed sleep with a condition-based wait that requires the item count to be both non-zero and stable across consecutive polling checks (DisplayHelper interval is 10ms). This ensures all RefreshJob cycles have settled before selection state is inspected. Timeout is extended to 5s.
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.
Summary
waitForDialogRefresh()previously waited fortable.getItemCount() > 0then slept a fixed 5×50ms (250ms) for the selection to be appliedFilteredItemsSelectionDialogruns two refresh cycles: one fromFilterHistoryJob(history items only) and one fromFilterJob(actual file results + selection applied)DisplayHelper.waitForConditionthat requires the item count to be stable (same value across two consecutive 10ms polls at non-zero), ensuring allRefreshJobcycles have settled before assertions run; timeout extended to 5sTest plan
testSingleSelectionAndTwoInitialSelectionsWithInitialPatternrepeatedly on macOS to verify no more intermittent failuresResourceInitialSelectionTestsuite to confirm no regressions in tests that expect empty selection (they still work — the stability condition only exits once count is non-zero and stable)