summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2015-03-16 19:26:17 +0100
committerAnatol Belski <ab@php.net>2015-03-16 19:26:17 +0100
commiteab7da4bc91a60220bc8c6a208de1d324a7529aa (patch)
tree533fbbf098d3b31f330ed49865656dc972fb8886
parent1c0fce922ec5549bc127ad1238036e5d084f096c (diff)
downloadphp-git-eab7da4bc91a60220bc8c6a208de1d324a7529aa.tar.gz
test timeout with exception variation
-rw-r--r--tests/basic/timeout_variation_6.phpt24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/basic/timeout_variation_6.phpt b/tests/basic/timeout_variation_6.phpt
new file mode 100644
index 0000000000..387a358fc8
--- /dev/null
+++ b/tests/basic/timeout_variation_6.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Timeout within function trowing exteption before timeout reached
+--FILE--
+<?php
+
+$t = 3;
+set_time_limit($t);
+
+function f($t) {
+ echo "call";
+ sleep($t-1);
+ throw new Exception("exception before timeout");
+}
+
+f($t);
+?>
+never reached here
+--EXPECTF--
+call
+Fatal error: Uncaught exception 'Exception' with message 'exception before timeout' in %s:%d
+Stack trace:
+#0 %s(%d): f(%d)
+#1 {main}
+ thrown in %s on line %d