We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1f90197 commit b561666Copy full SHA for b561666
tests/pathological/test.php
@@ -300,8 +300,12 @@
300
$timeout = 5; // 5 seconds
301
} else {
302
// Ideally, these cases should run in linear time or better,
303
- // but we'll allow a 50% margin of error.
304
- $timeout = \ceil($lastRunTime * $inputSize / $lastInputSize * 1.5);
+ // but we'll allow a 50% margin of error locally (or 2x in CI)
+ if (isset($_ENV['CI']) || isset($_SERVER['CI'])) {
305
+ $timeout = \ceil($lastRunTime * $inputSize / $lastInputSize * 2);
306
+ } else {
307
+ $timeout = \ceil($lastRunTime * $inputSize / $lastInputSize * 1.5);
308
+ }
309
// But regardless of this, we always want to wait at least 5 seconds,
310
// and at most 60 seconds.
311
$timeout = \max(5, \min(60, $timeout));
0 commit comments