Skip to content

Commit f8d7d3e

Browse files
Anna Larchmiaulalala
authored andcommitted
perf(tests): enforce PHPUnit time limits with sensible timeout values
The timeout attributes were defined but never enforced because enforceTimeLimit was missing. Adds enforceTimeLimit="true" and reduces values from the 900s blanket default to 60s/300s/600s for small/medium/large tests. Unannotated tests default to medium (300s), cutting the worst-case hang time per test from 15 min to 5 min. Signed-off-by: Anna Larch <anna@larch.dev> AI-Assisted-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Anna Larch <anna@nextcloud.com>
1 parent 685cb07 commit f8d7d3e

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

tests/phpunit-autotest-external.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66
-->
77
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
88
bootstrap="bootstrap.php"
9-
timeoutForSmallTests="900"
10-
timeoutForMediumTests="900"
11-
timeoutForLargeTests="900"
9+
enforceTimeLimit="true"
10+
timeoutForSmallTests="60"
11+
timeoutForMediumTests="300"
12+
timeoutForLargeTests="600"
1213
cacheDirectory=".phpunit.cache"
1314
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd">
1415
<testsuite name="Nextcloud files external">

tests/phpunit-autotest.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66
-->
77
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
88
bootstrap="bootstrap.php"
9-
timeoutForSmallTests="900"
10-
timeoutForMediumTests="900"
11-
timeoutForLargeTests="900"
9+
enforceTimeLimit="true"
10+
timeoutForSmallTests="60"
11+
timeoutForMediumTests="300"
12+
timeoutForLargeTests="600"
1213
cacheDirectory=".phpunit.cache"
1314
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd">
1415
<testsuite name="Nextcloud Server">

0 commit comments

Comments
 (0)