summaryrefslogtreecommitdiff
path: root/sapi/fpm/tests/pm-max-spawn-rate-config.phpt
diff options
context:
space:
mode:
authorJakub Zelenka <bukka@php.net>2021-03-28 21:06:45 +0100
committerJakub Zelenka <bukka@php.net>2021-03-28 21:06:45 +0100
commit4361fffaeaddd8da6ea00a3b2eafef247c7edf99 (patch)
tree08e2fd09ce28fdd9ecc9d4b44352aa25d1d76643 /sapi/fpm/tests/pm-max-spawn-rate-config.phpt
parenteac1609a847f7cca45c9c14e1b9c4d72cea04fd6 (diff)
downloadphp-git-4361fffaeaddd8da6ea00a3b2eafef247c7edf99.tar.gz
Add extra run test for pm.max_spawn_rate
Diffstat (limited to 'sapi/fpm/tests/pm-max-spawn-rate-config.phpt')
-rw-r--r--sapi/fpm/tests/pm-max-spawn-rate-config.phpt39
1 files changed, 39 insertions, 0 deletions
diff --git a/sapi/fpm/tests/pm-max-spawn-rate-config.phpt b/sapi/fpm/tests/pm-max-spawn-rate-config.phpt
new file mode 100644
index 0000000000..8b5f6b4eb6
--- /dev/null
+++ b/sapi/fpm/tests/pm-max-spawn-rate-config.phpt
@@ -0,0 +1,39 @@
+--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
+EOT;
+
+$tester = new FPM\Tester($cfg);
+$tester->start(['-t', '-t']);
+$tester->expectLogConfigOptions(['pm.max_spawn_rate' => 64]);
+$tester->close();
+
+?>
+Done
+--EXPECT--
+Done
+--CLEAN--
+<?php
+require_once "tester.inc";
+FPM\Tester::clean();
+?>