(34037) phpunit tests timeout too fast
authorAntoine Musso <hashar@free.fr>
Wed, 11 Apr 2012 19:01:34 +0000 (21:01 +0200)
committerAntoine Musso <hashar@free.fr>
Wed, 11 Apr 2012 19:08:09 +0000 (21:08 +0200)
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

tests/phpunit/suite.xml

index a03f392..f286fa1 100644 (file)
@@ -8,6 +8,9 @@
          convertNoticesToExceptions="true"
          convertWarningsToExceptions="true"
          stopOnFailure="false"
+                timeoutForSmallTests="2"
+                timeoutForMediumTests="10"
+                timeoutForLargeTests="60"
          strict="true"
                 verbose="true">
        <testsuites>