com php-src: test timeout within while loop: tests/basic/timeou t_variation_0.phpt
| From: | Anatol Belski | Date: | Mon, 16 Mar 2015 17:58:32 +0000 |
| Subject: | com php-src: test timeout within while loop: tests/basic/timeou t_variation_0.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-85539@lists.php.net to get a copy of this message | ||
Commit: 394bd2ab4128ec4551ddfa097a52689d38aa530f
Author: Anatol Belski <ab@php.net> Mon, 16 Mar 2015 18:58:32 +0100
Parents: 5c68836b0b6e205a4f3008934c550b0e80463d66
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=394bd2ab4128ec4551ddfa097a52689d38aa530f
Log:
test timeout within while loop
Changed paths:
A tests/basic/timeout_variation_0.phpt
Diff:
diff --git a/tests/basic/timeout_variation_0.phpt b/tests/basic/timeout_variation_0..phpt
new file mode 100644
index 0000000..31c878d
--- /dev/null
+++ b/tests/basic/timeout_variation_0.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Timeout within while loop
+--FILE--
+<?php
+
+$t = 3;
+set_time_limit($t);
+
+while(1) {
+ echo 1;
+ sleep(1);
+}
+
+?>
+never reached here
+--EXPECTF--
+111
+Fatal error: Maximum execution time of 3 seconds exceeded in %s on line %d