]> granicus.if.org Git - php/commitdiff
Add extra run test for pm.max_spawn_rate
authorJakub Zelenka <bukka@php.net>
Sun, 28 Mar 2021 20:06:45 +0000 (21:06 +0100)
committerJakub Zelenka <bukka@php.net>
Sun, 28 Mar 2021 20:06:45 +0000 (21:06 +0100)
sapi/fpm/tests/pm-max-spawn-rate-config.phpt [moved from sapi/fpm/tests/set-pm-max-spawn-rate.phpt with 100% similarity]
sapi/fpm/tests/pm-max-spawn-rate-run.phpt [new file with mode: 0644]

diff --git a/sapi/fpm/tests/pm-max-spawn-rate-run.phpt b/sapi/fpm/tests/pm-max-spawn-rate-run.phpt
new file mode 100644 (file)
index 0000000..ca128b4
--- /dev/null
@@ -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();
+?>