php - phpunit fails after a number of tests -


i run phpunit command line laravel website.

the output (first line) is:

.................fffffffffffffffff.fffffffff.fffffffffffffffff.  63 / 105 ( 60%) 

however, tests run fine individually. it's when run them of them fail.

all errors show code 500, 200 expected.

example:

<pre> not ok 99 - failure: teamtest::testapishow --- message: 'a request ''http://localhost/api/v1/teams/1'' failed. got 500 code instead.' severity: fail </pre> 

details

error occurs in line 47 of [..]vendor/laravel/framework/src/illuminate/database/connectors/connector.php

line 47: return new pdo($dsn, $username, $password, $options); 

full output: http://pastebin.com/bt29w7lz config of phpunit: http://pastebin.com/pbt59axm

it may case there many database connections open. both postgresql , mysql have limit on number of connections available, , phpunit neither pools connections nor return connections pool once used.

i have increase maximum connections postgresql on jenkins (unit test) servers 500 or more run full unit test suite.

see more here:

https://dev.mysql.com/doc/refman/5.5/en/too-many-connections.html

https://wiki.postgresql.org/wiki/number_of_database_connections


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -