summaryrefslogtreecommitdiff
path: root/sapi/fpm/tests/bug80024-socket-reduced-inherit.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'sapi/fpm/tests/bug80024-socket-reduced-inherit.phpt')
-rw-r--r--sapi/fpm/tests/bug80024-socket-reduced-inherit.phpt49
1 files changed, 49 insertions, 0 deletions
diff --git a/sapi/fpm/tests/bug80024-socket-reduced-inherit.phpt b/sapi/fpm/tests/bug80024-socket-reduced-inherit.phpt
new file mode 100644
index 0000000000..9c05471b67
--- /dev/null
+++ b/sapi/fpm/tests/bug80024-socket-reduced-inherit.phpt
@@ -0,0 +1,49 @@
+--TEST--
+FPM: bug80024 - Duplication of info about inherited socket after pool removing
+--SKIPIF--
+<?php include "skipif.inc"; ?>
+--FILE--
+<?php
+
+require_once "tester.inc";
+
+$cfg['main'] = <<<EOT
+[global]
+error_log = {{FILE:LOG}}
+pid = {{FILE:PID}}
+include = {{INCLUDE:CONF}}
+EOT;
+
+$cfg['poolTemplate'] = <<<EOT
+[pool_%index%]
+listen = {{ADDR:UDS[pool_%index%]}}
+pm = ondemand
+pm.start_servers = 2
+pm.min_spare_servers = 1
+pm.max_spare_servers = 3
+pm.max_children = 5
+EOT;
+
+$cfg['count'] = 129;
+
+$tester = new FPM\Tester($cfg);
+$tester->start();
+$tester->expectLogStartNotices();
+$cfg['count'] = 128;
+$tester->reload($cfg);
+$tester->expectLogReloadingNotices(129);
+$tester->reload();
+$tester->expectLogReloadingNotices(128);
+$tester->terminate();
+$tester->expectLogTerminatingNotices();
+$tester->close();
+
+?>
+Done
+--EXPECT--
+Done
+--CLEAN--
+<?php
+require_once "tester.inc";
+FPM\Tester::clean();
+?>