-
-
Notifications
You must be signed in to change notification settings - Fork 319
/
042.phpt
34 lines (29 loc) · 849 Bytes
/
042.phpt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
--TEST--
Check for maximum calls of yar concurrent call
--SKIPIF--
<?php
if (!extension_loaded("yar")) {
print "skip";
}
?>
--INI--
report_memleaks=0
--FILE--
<?php
include "yar.inc";
yar_server_start();
for ($i = 0; $i < 129; $i++) {
Yar_Concurrent_Client::call(YAR_API_ADDRESS, "usleep", array(1000000/*500ms*/), NULL, NULL, array(YAR_OPT_TIMEOUT => 1000));
}
Yar_Concurrent_Client::reset();
for ($i = 0; $i < 129; $i++) {
Yar_Concurrent_Client::call(YAR_API_ADDRESS, "usleep", array(1000000/*500ms*/), NULL, NULL, array(YAR_OPT_TIMEOUT => 1000));
}
--CLEAN--
<?php
include 'yar.inc';
yar_server_cleanup();
?>
--EXPECTF--
Warning: Yar_Concurrent_Client::call(): too many calls, maximum '128' are allowed in %s042.php on line %d
Warning: Yar_Concurrent_Client::call(): too many calls, maximum '128' are allowed in %s042.php on line %d