laravel / octane

Supercharge your Laravel application's performance.
https://laravel.com/docs/octane
MIT License
3.71k stars 284 forks source link

[2.x] Fix inter test dependencies #914

Closed timacdonald closed 3 weeks ago

timacdonald commented 3 weeks ago

This PR fixes some inter-test dependencies. Currently, certain tests depend on other test to be run first and can not be run individually.

Specifically, these tests rely on the container singleton to have been created by another test and to be shared between tests.

I noticed this issue when creating another PR and some unrelated tests randomly started failing with the change.

You can see these failures by running phpunit --process-isolation against the 2.x branch.

You can see the failing tests, in all their glory, in this test run (https://github.com/laravel/octane/actions/runs/9573937368/job/26396301757) which is tied to the commit that flushes the container between tests (https://github.com/laravel/octane/pull/914/commits/326bdc6ece335305bd4a6c3c6729f55aaec7686d)

This PR includes the container flushing and individual test fixes.