I use PHPUnit do to several tests on a Laravel 5.4 application.
More than 100 tests use database queries. I use \Illuminate\Foundation\Testing\DatabaseMigrations class to reset and migrate database before each test (so for each method in test file).
But when I run phpunit command, it displays me an error which is due to max_connection was exeeded.
I can't increase max_connection limit on the server. I tried to use --process-isolation argument for phpunit but it increase the duration time of tests : 15 minutes instead 2 minutes.
I searched a lot of time a way to set a processes number limit but I don't found anything except --process-isolation argument.
Do you know a way to set process number for PHPUnit ? Or a way to remove DB connection after test ?
Aucun commentaire:
Enregistrer un commentaire