Stop ParallelBuildChainTest failures from cascading through the class - #2855
Merged
vogella merged 1 commit intoAug 7, 2026
Merged
Conversation
Contributor
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
force-pushed
the
stabilize-parallel-build-chain-test
branch
from
August 7, 2026 11:18
aa899c0 to
7662d51
Compare
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.
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