Skip to content

Stop ParallelBuildChainTest failures from cascading through the class - #2855

Merged
vogella merged 1 commit into
eclipse-platform:masterfrom
vogella:stabilize-parallel-build-chain-test
Aug 7, 2026
Merged

Stop ParallelBuildChainTest failures from cascading through the class#2855
vogella merged 1 commit into
eclipse-platform:masterfrom
vogella:stabilize-parallel-build-chain-test

Conversation

@vogella

@vogella vogella commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

ParallelBuildChainTest fails randomly on CI with "builds are still running while resetting TimerBuilder", and once that happens every following test in the class fails the same way, each one hanging for a full minute. TimerBuilder waited for a fixed number of FINISH events, which is unreachable whenever fewer builds ran than expected, and it asserted before replacing its tracked state, so the unusable state stayed installed. Completion is now tracked by the number of currently running builders and the state is always replaced before it is checked, so a leaked build is reported against the test that caused it instead of poisoning the rest of the class.

The builder also busy-waited in TestUtil.waitForCondition, which kept 15 threads spinning for up to 40 seconds and starved the job scheduler on CI machines, so queued builds did not start within the timeout. It now blocks on a monitor, and each build binds to the state of its own test. The class runs in about 7 seconds locally and passed repeated consecutive runs.

Fixes #825

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Test Results

    54 files  ±0      54 suites  ±0   56m 37s ⏱️ - 1m 5s
 4 705 tests ±0   4 683 ✅ ±0   22 💤 ±0  0 ❌ ±0 
12 006 runs  ±0  11 853 ✅ ±0  153 💤 ±0  0 ❌ ±0 

Results for commit 7662d51. ± Comparison against base commit 7763306.

♻️ This comment has been updated with latest results.

TimerBuilder considered its builds done once the number of recorded FINISH
events reached the expected number of builds. That count is unreachable
whenever fewer builds ran than expected, for example when a test cancels a
partly finished build on purpose, so abortCurrentBuilds burned its full 60
second timeout. setExpectedNumberOfBuilds then asserted before replacing the
tracked state, so the throw left the unusable state installed and every
following test in the class failed with "builds are still running while
resetting TimerBuilder", each one hanging for another minute.

Completion is now tracked by the number of currently running builders, which
the builder itself always decrements, and the execution state is replaced
before it is checked, so a leaked build can no longer affect any later test.
tearDown resets unconditionally and reports the leak against the test that
caused it.

The builder also waited by spinning in TestUtil.waitForCondition. With 15
long running builds that kept 15 threads busy for up to 40 seconds and
starved the job scheduler on CI machines, so queued builds did not start
within the timeout. It now blocks on a monitor instead, and each build binds
to the state of its own test so a leaked build cannot contribute events to
the next one.

Fixes eclipse-platform#825
@vogella
vogella force-pushed the stabilize-parallel-build-chain-test branch from aa899c0 to 7662d51 Compare August 7, 2026 11:18
@vogella
vogella merged commit 47a5548 into eclipse-platform:master Aug 7, 2026
18 checks passed
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.

Random failing ParallelBuildChainTest.testIndividualProjectBuilds_WithManyProjects_ProjectRelaxedRule

1 participant