There was a problem with phpunit on symfony due to their parallel execution.
More precisely, when executing setUp, execution drops with a message about too many database connections (PDOException: SQLSTATE [HY000] [1040] Too many connections)
How to run a bunch of unrelated (not depends) tests in one thread?
Googling has not helped yet.
|
1 answer
The problem was that the connection did not close automatically.
$ entityManager-> getConnection () -> close ();
Found the answer here
- @zenith, in a good way, the database in unit tests should not participate at all (and the doctrine too): symfony.com/doc/current/cookbook/testing/database.html - etki
- Agree with Etki, this is more like functional testing. But still a plus. - Nick Volynkin ♦
|
@runInSeparateProcessand remove them - etki