Closed mnsami closed 3 years ago
It sounds like is a concurrency issue, not fastest one. Maybe your tests are not independant so, when parallelized, the issue arise.
@DonCallisto you mean each test function within a class ?
I have to deep investigate that, it is a company project I would like to optimize.
But can't the fastest env variables fix that in a way ?
As stated before, I don't think it's a matter of fastest. Maybe your app is trying to aquire a lock on something. When you execute tests with phpunit (sequentially), you won't notice this, but when more processes are running at the same time, you'll end up in concurrent acquisition attempt. Maybe it's a spy for possible issue inside the app itself. Don't know why you're referring to env variables here: have they something to do with locks or serialization or whatever?
thanks @DonCallisto .. I have solved some of the issues by debugging.
I'm running a laravel 5.3 and php7.2 project, and I'm trying to use
fastest
to boil down a 30mins test run.My tests are divided between:
each are defined inside a group in
phpunit.xml
But there is something I can't wrap my head around, the
env
variables.When I run
find tests/ -name "*Test.php" | vendor/bin/fastest -o "vendor/bin/phpunit -c phpunit.xml {};" -vv
I get errors like:Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction
db_tests_2
any help or pointers about what am I doing wrong ?
In our base
SystemTest
we are setting the db by running migrations and seeding.Any help would be appreciated.