Skip to content

Conversation

@vogella
Copy link
Contributor

@vogella vogella commented Nov 11, 2025

Summary

Fixes the flaky testKeepOneProperty test that intermittently failed with expected:<1> but was:<0> due to a race condition.

Problem

The test was asserting the KEEPONE property result before the async cleanup logic had completed. The previous fix (commit 39d028e) added an error job as a synchronization marker, but this wasn't sufficient as the cleanup can still be pending after the error job appears in the progress view.

Solution

This fix adds explicit waits for the actual condition being tested: that exactly 1 item from the DummyFamilyJob family remains in the progress view. By using processEventsUntil(() -> countBelongingProgressItems(DummyFamilyJob.class) == 1, timeout), we ensure the KEEPONE cleanup has fully stabilized before asserting.

Changes

  • Added explicit wait for count to stabilize at 1 in first test scenario (line 227)
  • Added explicit wait for count to stabilize at 1 in second test scenario (line 260, where the failure occurred)
  • Uses longer timeout (5000ms) for the more complex second scenario with 20 concurrent jobs

Testing

Verified the fix by running the test 5 times consecutively - all passed successfully.

Related

Fixes: https://github.com/eclipse-platform/eclipse.platform.ui/runs/55056915330

🤖 Generated with Claude Code

The test was failing intermittently with "expected:<1> but was:<0>" because
it was asserting the KEEPONE property result before the async cleanup logic
had completed. The previous fix added an error job as a synchronization
marker, but this wasn't sufficient as the cleanup can still be pending after
the error job appears.

This fix adds explicit waits for the actual condition being tested: that
exactly 1 item from the DummyFamilyJob family remains in the progress view.
By waiting for countBelongingProgressItems() to return 1, we ensure the
KEEPONE cleanup has fully stabilized before asserting.

Fixes: https://github.com/eclipse-platform/eclipse.platform.ui/runs/55056915330

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@github-actions
Copy link
Contributor

Test Results

 3 018 files  ±0   3 018 suites  ±0   2h 12m 23s ⏱️ - 10m 29s
 8 234 tests ±0   7 985 ✅ +1  249 💤 ±0  0 ❌  - 1 
23 622 runs  ±0  22 828 ✅ +1  794 💤 ±0  0 ❌  - 1 

Results for commit 9dc17d7. ± Comparison against base commit 1a43fc1.

@vogella vogella marked this pull request as ready for review November 11, 2025 09:48
@vogella vogella merged commit a2174ff into eclipse-platform:master Nov 11, 2025
18 checks passed
@vogella vogella deleted the fix-flaky-progress-keepone-test branch November 11, 2025 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant