From 39adb292d54403d17f86f6852e87b0bda1d49946 Mon Sep 17 00:00:00 2001 From: Andrei Zeliankou Date: Mon, 18 Oct 2021 01:10:11 +0100 Subject: Tests: style. --- test/test_php_application.py | 1 - 1 file changed, 1 deletion(-) (limited to 'test/test_php_application.py') diff --git a/test/test_php_application.py b/test/test_php_application.py index 66e2ef7d..bb7d978c 100644 --- a/test/test_php_application.py +++ b/test/test_php_application.py @@ -5,7 +5,6 @@ import signal import time import pytest - from unit.applications.lang.php import TestApplicationPHP from unit.option import option -- cgit From b424a00ec5746884f8ebb1d75b3f0fec0b3a05ff Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Tue, 9 Nov 2021 15:48:44 +0300 Subject: Tests: PHP shared opcache test added. --- test/test_php_application.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'test/test_php_application.py') diff --git a/test/test_php_application.py b/test/test_php_application.py index bb7d978c..d9c16a6d 100644 --- a/test/test_php_application.py +++ b/test/test_php_application.py @@ -713,3 +713,20 @@ class TestPHPApplication(TestApplicationPHP): ), 'relative path w/ chdir' assert self.get()['body'] == 'test', 'relative path 2' + + def test_php_application_shared_opcache(self): + self.load('opcache', limits={'requests': 1}) + + r = self.get() + cached = r['headers']['X-Cached'] + if cached == '-1': + pytest.skip('opcache is not supported') + + pid = r['headers']['X-Pid'] + + assert cached == '0', 'not cached' + + r = self.get() + + assert r['headers']['X-Pid'] != pid, 'new instance' + assert r['headers']['X-Cached'] == '1', 'cached' -- cgit