summaryrefslogtreecommitdiff
path: root/sapi/fpm/tests/pm-max-spawn-rate-config.phpt
diff options
context:
space:
mode:
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();
+?>