bug68423-multi-pool-all-pms.phpt 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. --TEST--
  2. FPM: bug68423 - Multiple pools with different PMs (dynamic + ondemand + static)
  3. --SKIPIF--
  4. <?php include "skipif.inc"; ?>
  5. --FILE--
  6. <?php
  7. require_once "tester.inc";
  8. $cfg = <<<EOT
  9. [global]
  10. error_log = {{FILE:LOG}}
  11. [pool_dynamic]
  12. listen = {{ADDR[dynamic]}}
  13. ping.path = /ping
  14. ping.response = pong-dynamic
  15. pm = dynamic
  16. pm.max_children = 5
  17. pm.start_servers = 2
  18. pm.min_spare_servers = 1
  19. pm.max_spare_servers = 3
  20. [pool_ondemand]
  21. listen = {{ADDR[ondemand]}}
  22. ping.path = /ping
  23. ping.response = pong-on-demand
  24. pm = ondemand
  25. pm.max_children = 2
  26. pm.process_idle_timeout = 10
  27. [pool_static]
  28. listen = {{ADDR[static]}}
  29. ping.path = /ping
  30. ping.response = pong-static
  31. pm = static
  32. pm.max_children = 2
  33. EOT;
  34. $tester = new FPM\Tester($cfg);
  35. $tester->start();
  36. $tester->expectLogStartNotices();
  37. $tester->ping('{{ADDR[dynamic]}}', 'pong-dynamic');
  38. $tester->ping('{{ADDR[ondemand]}}', 'pong-on-demand');
  39. $tester->ping('{{ADDR[static]}}', 'pong-static');
  40. $tester->terminate();
  41. $tester->expectLogTerminatingNotices();
  42. $tester->close();
  43. ?>
  44. Done
  45. --EXPECT--
  46. Done
  47. --CLEAN--
  48. <?php
  49. require_once "tester.inc";
  50. FPM\Tester::clean();
  51. ?>