Condorcet
Condorcet copied to clipboard
Tests: parallel mod (paratest, pest --parallel) fail erratically and inconsistently (and worse with JIT)
Q | A |
---|---|
Type | Bug |
Condorcet version | * |
PHP version | ? |
ENV | *? |
Installation Method | Composer |
Describe the bug Tests fail erratically and inconsistently when run in parallel mode (various libraries), can be different fails at each run, and even worse with JIT enabled. Look to be a PHP or test libraries bug due to the complexity of Condorcet.
To Reproduce
composer require --dev brianium/paratest
vendor/bin/paratest
(same with pest --parallel
)
Expected behavior No error, like without parallel.
@toddy15 This one is funny
Is this related to this issue? After my commit to the 'Experimental/Schulze-STV' branch, some tests pass when run individually, but fail when running composer test
.
No, this one is more about extraordinary and absurd (some of them not predictable between each runs) compilation errors. The first and iconic bug is that breaks class loader (with the correct use statement).
Parallel test and Jit compilation are experimental (tierce libraries and less know libraries, recent features...) in the PHP ecosystem. Condorcet work very well with non-parallel tests, and very well with (all ?) JIT compilation options. But not with parallel test (and worse if parallel + JIT). This ticket is more about bugs in PHP and test libraries than Condorcet. (in the past, Condorcet was one of the first to find some news bugs with JIT compilation after public release of this recent PHP feature).