Skip to content

Restore settle delay in code mining test fixtures - #4218

Merged
vogella merged 1 commit into
eclipse-platform:masterfrom
vogella:restore-codemining-test-settle
Jul 31, 2026
Merged

Restore settle delay in code mining test fixtures#4218
vogella merged 1 commit into
eclipse-platform:masterfrom
vogella:restore-codemining-test-settle

Conversation

@vogella

@vogella vogella commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Reverts 13b7e48, which made CodeMiningTest.testCodeMiningCompletableFutureReturnsNull() fail sporadically on the I-builds.

The reasoning behind removing the settle only covered the code minings, not the reconciler. AbstractReconciler.startReconciling() schedules a job that waits fDelay before running initialProcess() and starting the worker thread, so the sleep was what let the reconciler finish starting up before a test ran. Without it the document change in the test body arrives mid-startup and takes an extra delay cycle before it is reconciled, which on a loaded machine exceeds the 3s assertion budget. The two affected tests are the only ones in the class that rely on the reconciler picking up a document change rather than on a setCodeMiningProviders() call issued after the document is set.

Also resets DelayedEchoCodeMiningProvider.DELAY in tearDown, since testCodeMiningCtrlHome() raises that static field to 500 and every later test in the class inherited the slower provider.

Fixes #4217

Reverts 13b7e48. Removing DisplayHelper.sleep(display, 1000) from
CodeMiningTest.setUp() and CodeMiningLineHeaderAnnotationTest.setUp()
made CodeMiningTest.testCodeMiningCompletableFutureReturnsNull() fail
sporadically on the I-builds.

The reasoning behind the removal only covered the code minings, not the
reconciler. AbstractReconciler.startReconciling() schedules a job that
waits fDelay before running initialProcess() and starting the worker
thread, so the sleep was what let the reconciler finish starting up
before a test ran. Without it, the document change in the test body
arrives mid-startup and takes an extra delay cycle before it is
reconciled, which on a loaded machine exceeds the 3s assertion budget.
The two affected tests are the only ones in the class that rely on the
reconciler picking up a document change rather than on a
setCodeMiningProviders() call after the document is set.

Also reset DelayedEchoCodeMiningProvider.DELAY in tearDown, since
testCodeMiningCtrlHome() raises the static field to 500 and every later
test in the class inherited the slower provider.

Fixes eclipse-platform#4217
@github-actions

Copy link
Copy Markdown
Contributor

Test Results

   858 files  ±  0     858 suites  ±0   47m 7s ⏱️ + 10m 18s
 8 129 tests ±  0   7 886 ✅ ± 0  243 💤 ± 0  0 ❌ ±0 
20 289 runs  +131  19 635 ✅ +98  654 💤 +33  0 ❌ ±0 

Results for commit 60feeaf. ± Comparison against base commit a833259.

@vogella
vogella merged commit b5954f1 into eclipse-platform:master Jul 31, 2026
18 checks passed
@vogella
vogella deleted the restore-codemining-test-settle branch July 31, 2026 10:31
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.

CodeMiningTest.testCodeMiningCompletableFutureReturnsNull() fails sporadically

1 participant