You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My tests can run if I create the databases manually. So I looked into the source to see where it goes wrong. What I found was that this try/catch block is where something is messed up (for me at least). It seems like Laravel tries to use a database, and whenever it stumbles upon an exception it assumes that it should recreate the database.
However, for me, the exception that is thrown is of another type: Doctrine\DBAL\Driver\PDO\Exception not Illuminate\Database\QueryException. So if I change that catch-handler to the right exception type it works.
Can you first please try one of the support channels below? If you can actually identify this as a bug, feel free to open up a new issue with a link to the original one and we'll gladly help you out.
So, I've tried to pin point the reason for this behavior. I found that this happens when requiring these two packages in a brand new Laravel installation:
Description:
When I run
php artisan test --parallel
I get an exception:My tests can run if I create the databases manually. So I looked into the source to see where it goes wrong. What I found was that this try/catch block is where something is messed up (for me at least). It seems like Laravel tries to use a database, and whenever it stumbles upon an exception it assumes that it should recreate the database.
However, for me, the exception that is thrown is of another type:
Doctrine\DBAL\Driver\PDO\Exception
notIlluminate\Database\QueryException
. So if I change that catch-handler to the right exception type it works.framework/src/Illuminate/Testing/Concerns/TestDatabases.php
Lines 78 to 89 in f60e5ce
Why is this happening? Is there something I've missed in an earlier Laravel upgrade? Or is it a bug?
The text was updated successfully, but these errors were encountered: