Multi-threaded mutation testing
Hi, I am trying to use Infection on a Laravel 10 codebase and am running into issues when running Infection with more than 1 thread. Running it single threaded is not ideal as it takes nearly 20 minutes to complete.
Infection does run with multiple threads, but it reports a much higher MSI score then single threaded. My own debugging of these issues point me to the database being used in feature tests as being the problem, specifically the Infection threads seem to be using only a single database and the automated database clean up and creation (which work fine with artisan test with multiple threads) seem to cause basically all feature tests to run into database related exceptions. For example a table that already exists when it doesn't expect it yet or a table that does not exist when it should. This causes Infection to mark a mutation as killed, but wasn't the test legitimately catching the issue, just threads fighting over the database.
Unfortunately, I have only started developing in Laravel recently and have not found a good way to ensure that in the case of Infection running the tests it will properly use separate databases. I have tried to somehow introduce Infection's test_token into the database name used during testing, but could not figure out a good way to do this.
Any help in solving the above issue or a different way in which to get multi-threaded Infection working would be appreciated.
Please or to participate in this conversation.