pestphp / pest

Pest is an elegant PHP testing Framework with a focus on simplicity, meticulously designed to bring back the joy of testing in PHP.
https://pestphp.com
MIT License
9.41k stars 337 forks source link

[Bug]: Timeout to low #1233

Open sinnbeck opened 1 week ago

sinnbeck commented 1 week ago

What Happened

I am working with a filament app, but apparently the default timeout is too low. I am running in parallel, but almost all tests are timing out which means I cannot trust my tests at all

image

How to Reproduce

Have a complex filament page with a lot of form fields

Sample Repository

No response

Pest Version

3.0.4

PHP Version

8.3

Operation System

Linux

Notes

I am running the tests in docker (Lando).

It might be practical to allow overwriting the timeout with a flag or a setting in Pest.php

If I just manually change the timeout in the vendor folder it works image

danielh-official commented 1 week ago

Could this work for you? --default-time-limit <sec>

https://pestphp.com/docs/cli-api-reference#content-execution

sinnbeck commented 6 days ago

@danielh-official thanks for the suggestion but I just get The "--default-time-limit" option does not exist.

And I doubt it would work, as the values are hardcoded currently. https://github.com/pestphp/pest-plugin-mutate/blob/3.x/src/MutationTest.php#L108

gehrisandro commented 5 days ago

Hi @sinnbeck

Thanks for raising the issue.

Looks like we are missing the correct implementation there. I am going to fix that.

gehrisandro commented 5 days ago

Issue will be fixed in the next release https://github.com/pestphp/pest-plugin-mutate/pull/15

gehrisandro commented 5 days ago

@nunomaduro This issue can be closed.

jonathanpmartins commented 7 hours ago

@gehrisandro Is there a way that we could set a custom timeout? Or a custom timeout offset on top of the calculated one?