Condorcet icon indicating copy to clipboard operation
Condorcet copied to clipboard

Tests: parallel mod (paratest, pest --parallel) fail erratically and inconsistently (and worse with JIT)

Open julien-boudry opened this issue 1 year ago • 3 comments

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.

julien-boudry avatar Jul 12 '23 17:07 julien-boudry

@toddy15 This one is funny

julien-boudry avatar Jul 12 '23 17:07 julien-boudry

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.

LiamM32 avatar Jul 14 '23 19:07 LiamM32

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).

julien-boudry avatar Jul 14 '23 22:07 julien-boudry