com php-src: test timeout with exception: tests/basic/timeout _variation_5.phpt
| From: | Anatol Belski | Date: | Mon, 16 Mar 2015 18:21:58 +0000 |
| Subject: | com php-src: test timeout with exception: tests/basic/timeout _variation_5.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-85541@lists.php.net to get a copy of this message | ||
Commit: 1c0fce922ec5549bc127ad1238036e5d084f096c
Author: Anatol Belski <ab@php.net> Mon, 16 Mar 2015 19:21:58 +0100
Parents: 8f1fa842cd7248e9b4faf8a9f426d9a83b3c468e
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1c0fce922ec5549bc127ad1238036e5d084f096c
Log:
test timeout with exception
Changed paths:
A tests/basic/timeout_variation_5.phpt
Diff:
diff --git a/tests/basic/timeout_variation_5.phpt b/tests/basic/timeout_variation_5.phpt
new file mode 100644
index 0000000..e4ccfff
--- /dev/null
+++ b/tests/basic/timeout_variation_5.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Timeout within function containing exteption
+--FILE--
+<?php
+
+$t = 3;
+set_time_limit($t);
+
+function f($t) {
+ echo "call";
+ sleep($t*2);
+ throw new Exception("never reached here");
+}
+
+f($t);
+?>
+never reached here
+--EXPECTF--
+call
+Fatal error: Maximum execution time of 3 seconds exceeded in %s on line %d