summaryrefslogtreecommitdiff
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
parenteac1609a847f7cca45c9c14e1b9c4d72cea04fd6 (diff)
downloadphp-git-4361fffaeaddd8da6ea00a3b2eafef247c7edf99.tar.gz
Add extra run test for pm.max_spawn_rate
-rw-r--r--sapi/fpm/tests/pm-max-spawn-rate-config.phpt (renamed from sapi/fpm/tests/set-pm-max-spawn-rate.phpt)0
-rw-r--r--sapi/fpm/tests/pm-max-spawn-rate-run.phpt44
2 files changed, 44 insertions, 0 deletions
diff --git a/sapi/fpm/tests/set-pm-max-spawn-rate.phpt b/sapi/fpm/tests/pm-max-spawn-rate-config.phpt
index 8b5f6b4eb6..8b5f6b4eb6 100644
--- a/sapi/fpm/tests/set-pm-max-spawn-rate.phpt
+++ b/sapi/fpm/tests/pm-max-spawn-rate-config.phpt
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
index 0000000000..ca128b4675
--- /dev/null
+++ b/sapi/fpm/tests/pm-max-spawn-rate-run.phpt
@@ -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();
+?>