mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
test timeout with exception variation
This commit is contained in:
parent
1c0fce922e
commit
eab7da4bc9
24
tests/basic/timeout_variation_6.phpt
Normal file
24
tests/basic/timeout_variation_6.phpt
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user