From: Antoine Musso Date: Wed, 11 Apr 2012 19:01:34 +0000 (+0200) Subject: (34037) phpunit tests timeout too fast X-Git-Tag: 1.31.0-rc.0~23930 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dcompta/operations/supprimer.php?a=commitdiff_plain;h=d664ffd18aeb955cf879d075bd22dcd325cfc4b1;p=lhc%2Fweb%2Fwiklou.git (34037) phpunit tests timeout too fast PHPUnit has a timeout protection system which let us put tests in three categories having different timeout (default: 1s, 10s, 60s). The timeout only happens when using strict mode and having PHPUnit Invoker installed. Recently, the continuous integration server has been upgraded and the PHPUnit Invoker was installed to let us run a serie of tests related to dumping the database to XML. They do need some timeout system. Suddenly, some tests started failing. By default all tests are in the 1 second timeout group. Since we use a sqlite backend and the server hard disk can get busy, some test can take more than one second to execute. This patch raise the default (small group) timeout to 2seconds and explicitly define the value for the two other groups (medium and large) using PHPUnit default values. Change-Id: I2f5613b0c0215023c413dec8e84804175d8c8d6e --- diff --git a/tests/phpunit/suite.xml b/tests/phpunit/suite.xml index a03f392bc4..f286fa1187 100644 --- a/tests/phpunit/suite.xml +++ b/tests/phpunit/suite.xml @@ -8,6 +8,9 @@ convertNoticesToExceptions="true" convertWarningsToExceptions="true" stopOnFailure="false" + timeoutForSmallTests="2" + timeoutForMediumTests="10" + timeoutForLargeTests="60" strict="true" verbose="true">