diff options
| author | Nikita Popov <nikita.ppv@gmail.com> | 2019-12-05 11:19:27 +0100 |
|---|---|---|
| committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-12-05 11:19:27 +0100 |
| commit | cec7bd58f80c970543ff17144c73b4998631ca7e (patch) | |
| tree | b29fc30e87502100f5268c61b43cfe50783d8a11 /tests/basic/timeout_variation_8.phpt | |
| parent | 6894cbe04289fa6d825077836f8c8b78478f1aaa (diff) | |
| parent | e760d94f4bb4d0802e89af0927cecfb479cba024 (diff) | |
| download | php-git-cec7bd58f80c970543ff17144c73b4998631ca7e.tar.gz | |
Merge branch 'PHP-7.4'
* PHP-7.4:
Fix timeout tests
Diffstat (limited to 'tests/basic/timeout_variation_8.phpt')
| -rw-r--r-- | tests/basic/timeout_variation_8.phpt | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/tests/basic/timeout_variation_8.phpt b/tests/basic/timeout_variation_8.phpt index 51022250f0..16e2567e66 100644 --- a/tests/basic/timeout_variation_8.phpt +++ b/tests/basic/timeout_variation_8.phpt @@ -2,25 +2,17 @@ Timeout within foreach loop --SKIPIF-- <?php - if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); +if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); ?> --FILE-- <?php -include __DIR__ . DIRECTORY_SEPARATOR . "timeout_config.inc"; +set_time_limit(1); -set_time_limit($t); - -$startTime = microtime(true); - -foreach (range(0, 42) as $i) { - busy_wait(1); +foreach (new InfiniteIterator(new ArrayIterator([1])) as $i) { } -$diff = microtime(true) - $startTime; -echo "time spent waiting: $diff\n"; - ?> never reached here --EXPECTF-- -Fatal error: Maximum execution time of 3 seconds exceeded in %s on line %d +Fatal error: Maximum execution time of 1 second exceeded in %s on line %d |
