mirror of
https://github.com/php/php-src.git
synced 2026-03-24 08:12:21 +01:00
Add extra run test for pm.max_spawn_rate
This commit is contained in:
44
sapi/fpm/tests/pm-max-spawn-rate-run.phpt
Normal file
44
sapi/fpm/tests/pm-max-spawn-rate-run.phpt
Normal file
@@ -0,0 +1,44 @@
|
||||
--TEST--
|
||||
FPM: set pm.max_spawn_rate
|
||||
--SKIPIF--
|
||||
<?php
|
||||
include "skipif.inc";
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require_once "tester.inc";
|
||||
|
||||
$cfg = <<<EOT
|
||||
[global]
|
||||
error_log = {{FILE:LOG}}
|
||||
log_level = notice
|
||||
[unconfined]
|
||||
listen = {{ADDR}}
|
||||
pm = dynamic
|
||||
pm.max_children = 5
|
||||
pm.start_servers = 2
|
||||
pm.min_spare_servers = 1
|
||||
pm.max_spare_servers = 3
|
||||
pm.max_spawn_rate = 64
|
||||
ping.path = /ping
|
||||
ping.response = pong
|
||||
EOT;
|
||||
|
||||
$tester = new FPM\Tester($cfg);
|
||||
$tester->start();
|
||||
$tester->expectLogStartNotices();
|
||||
$tester->ping();
|
||||
$tester->terminate();
|
||||
$tester->expectLogTerminatingNotices();
|
||||
$tester->close();
|
||||
|
||||
?>
|
||||
Done
|
||||
--EXPECT--
|
||||
Done
|
||||
--CLEAN--
|
||||
<?php
|
||||
require_once "tester.inc";
|
||||
FPM\Tester::clean();
|
||||
?>
|
||||
Reference in New Issue
Block a user