Hello,
I have a major problem running a large feature file containing a lot of scenarios.
After some scenarios, I get the following exception:
An exception occurred in driver: SQLSTATE[08004] [1040] Too many connections (Doctrine\DBAL\Exception\DriverException)
My feature file looks like this:
Feature: Check all possible pages
Scenario Outline: Checking system routes
Given I am on "<path>"
Then the response status code should be 200
Examples:
| path |
| / |
| /login |
| /logout |
...
Let's say that I have more than 100 url to check.
It seems that the Doctrine connections are not correctly closed.
I tried adding this but it does not solve the issue:
/**
* @AfterScenario
*/
public function closeConnections(AfterScenarioScope $event)
{
$doctrine = $this->container->get('doctrine');
foreach ($doctrine->getConnections() as $connection)
{
$connection->close();
}
}
Hello, I have a major problem running a large feature file containing a lot of scenarios. After some scenarios, I get the following exception:
An exception occurred in driver: SQLSTATE[08004] [1040] Too many connections (Doctrine\DBAL\Exception\DriverException)
My feature file looks like this:
Let's say that I have more than 100 url to check.
It seems that the Doctrine connections are not correctly closed.
I tried adding this but it does not solve the issue: