pest icon indicating copy to clipboard operation
pest copied to clipboard

[Bug]: invalid dataset not showing as FAILED when running with --parallel

Open mtbossa opened this issue 1 year ago • 3 comments

What Happened

When I have a test that uses a dataset ->with('my dataset'), but this dataset doesn't exist, and I run sail test --parallel, no FAILED message is shown in the output. However, if I just run sail test, then it'll show as FAILED, so I know something is wrong.

How to Reproduce

Install a fresh Laravel App, add Pest, add a test that uses a non-existent dataset, run ./vendor/bin/pest --parallel.

Sample Repository

https://github.com/mtbossa/pest-parallel-bug-laravel

Pest Version

2.34.8

PHP Version

8.3.8

Operation System

Linux

Notes

Screenshot_20240629_082424 Screenshot_20240629_082401

mtbossa avatar Jun 29 '24 11:06 mtbossa

I'm experiencing the same error - when the fault is introduced it seems like the tests are just skipped.

This is the output for the suite before introducing the error.

Tests:    1190 passed (5990 assertions)
Duration: 3.83s
Parallel: 11 processes

This is the output for the suite after introducing the error.

Tests:    1062 passed (5862 assertions)
Duration: 3.88s
Parallel: 11 processes

It looks like 128 tests have disappeared, but no failures at all. Running the tests without --parallel will instantly crash with the error being outputted.

Edit: I'm using Pest 3.2

FrittenKeeZ avatar Sep 27 '24 13:09 FrittenKeeZ

I'm experiencing the same error - when the fault is introduced it seems like the tests are just skipped.

This is the output for the suite before introducing the error.

Tests:    1190 passed (5990 assertions)
Duration: 3.83s
Parallel: 11 processes

This is the output for the suite after introducing the error.

Tests:    1062 passed (5862 assertions)
Duration: 3.88s
Parallel: 11 processes

It looks like 128 tests have disappeared, but no failures at all. Running the tests without --parallel will instantly crash with the error being outputted.

Edit: I'm using Pest 3.2

Yes. I used an inexistent dataset in the example, but it also happens if the test fails. This is pretty huge, actually. We need to choose between running with --parallel, but being aware that we won't know if dataset tests have failed. Or run it without --parallel flag, which makes testing very slow.

mtbossa avatar Sep 27 '24 13:09 mtbossa

I just run into the same issue, still present on Pest version 3.8.2.

Will have to remove parallel testing from production pipeline

martinbuezas avatar Jun 26 '25 17:06 martinbuezas

duplicated of: https://github.com/pestphp/pest/issues/1121.

nunomaduro avatar Aug 03 '25 16:08 nunomaduro