Skip to content

Commit

Permalink
Rewrite ParallelBuildChainTest and fix random failures eclipse-platfo…
Browse files Browse the repository at this point in the history
…rm#609

The ParallelBuildChainTest has random failing test methods. Its
implementation relies on specific timing behavior. It spawns builds for
different projects or the workspace that take a specific (absolute,
hard-coded) amount of time to finish. This has two drawbacks:
1. It induces a race conditions, as whenever execution times exceed
these amounts of time (e.g., due to slow infrastructure), the tests will
randomly fail.
2. The tests spent much time for unnecessary busy waiting making them
require more time / resources than necessary.

This change addresses the issues by not relying on builds to finish but
on builds to be started. This is sufficient, as the tests are supposed
to validate under which circumstances parallel builds are allowed or
expected.
To this end, the test now uses either immediately finishing builds or by
making them run for a very long time. The long running builds will only
be validated regarding whether they have started and will be explicitly
aborted when the actual test has finished. This removes the necessity to
rely on specific timing behavior. Only one test case validating that a
build is not started uses a timeout to wait for, as a blocked build
cannot be detected easily.
This change also adds two additional test cases reflecting further
combinations of scheduling rules and build configurations.

Fixes eclipse-platform#609.
  • Loading branch information
HeikoKlare authored and mickaelistria committed Aug 24, 2023
1 parent adca2ac commit 3ac31be
Show file tree
Hide file tree
Showing 3 changed files with 552 additions and 338 deletions.
Loading

0 comments on commit 3ac31be

Please sign in to comment.