mirror of
https://github.com/apache/httpd.git
synced 2026-10-23 22:49:01 +03:00
client. * modules/cache/mod_socache_redis.c (RD_DEFAULT_SERVER_RWTO): Define in seconds rather than microseconds. (socache_rd_set_timeout): Convert the timeout from apr_time_t to whole seconds, rounding up so a positive value does not become 0. * test/modules/ssl/env.py (SSLTestSetup.__init__): Add socache_redis as an optional module. * test/modules/ssl/test_004_socache_redis.py: New test using a silent Redis server to verify that RedisTimeout values are applied with the expected whole-second rounding. Submitted by: Christophe JAILLET, Arturo Bernal <abernal apache.org> GitHub: closes #790 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1938833 13f79535-47bb-0310-9956-ffa450edef68
26 lines
715 B
Python
26 lines
715 B
Python
import inspect
|
|
import logging
|
|
import os
|
|
|
|
from pyhttpd.env import HttpdTestEnv, HttpdTestSetup
|
|
|
|
log = logging.getLogger(__name__)
|
|
|
|
|
|
class SSLTestSetup(HttpdTestSetup):
|
|
|
|
def __init__(self, env: 'HttpdTestEnv'):
|
|
super().__init__(env=env)
|
|
self.add_source_dir(os.path.dirname(inspect.getfile(SSLTestSetup)))
|
|
self.add_modules(["ssl"])
|
|
self.add_optional_modules(["socache_redis"])
|
|
|
|
|
|
class SSLTestEnv(HttpdTestEnv):
|
|
|
|
def __init__(self, pytestconfig=None):
|
|
super().__init__(pytestconfig=pytestconfig)
|
|
self.add_httpd_log_modules(["http", "ssl", "core"])
|
|
|
|
def setup_httpd(self, setup: HttpdTestSetup = None):
|
|
super().setup_httpd(setup=SSLTestSetup(env=self)) |