Skip to content

Wait for the decoration jobs instead of sleeping a fixed time - #4287

Open
vogella wants to merge 1 commit into
eclipse-platform:masterfrom
vogella:decoration-test-wait-for-jobs
Open

Wait for the decoration jobs instead of sleeping a fixed time#4287
vogella wants to merge 1 commit into
eclipse-platform:masterfrom
vogella:decoration-test-wait-for-jobs

Conversation

@vogella

@vogella vogella commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

DecorationSchedulerRaceConditionTest slept a fixed 500 ms after each decoration and assumed the update job had run by then. That ties the test to DecorationScheduler.UPDATE_DELAY, an internal constant it has no business knowing about.

It now waits for the FAMILY_DECORATE jobs to finish instead. A plain join on the family would deadlock, because the update job is a WorkbenchJob that needs the UI thread, so the wait spins the event loop through DisplayHelper and polls the job manager.

The timeout goes from 500 ms to 5 s since it is an upper bound now rather than an unconditional sleep. In practice the test gets faster (both cases run in 2.8 s), and a timeout fails with a clear message instead of an assertEquals on stale text.

DecorationSchedulerRaceConditionTest slept 500 ms and assumed the update
job had run by then. Waiting for the FAMILY_DECORATE jobs to finish is
both faster and independent of the scheduler's internal delay.
@github-actions

Copy link
Copy Markdown
Contributor

Test Results

   858 files  ±0     858 suites  ±0   53m 28s ⏱️ - 4m 16s
 8 174 tests ±0   7 931 ✅ ±0  243 💤 ±0  0 ❌ ±0 
20 424 runs  ±0  19 768 ✅ ±0  656 💤 ±0  0 ❌ ±0 

Results for commit 1be59e6. ± Comparison against base commit f0ef795.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Replaces fixed delays in the navigator decoration race-condition test with event-loop-aware job completion waits.

Changes:

  • Polls the decoration job family while processing UI events.
  • Adds a 5-second timeout with an explicit failure message.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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.

2 participants