summaryrefslogtreecommitdiff
path: root/test/modules/http2/test_105_timeout.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/modules/http2/test_105_timeout.py')
-rw-r--r--test/modules/http2/test_105_timeout.py40
1 files changed, 20 insertions, 20 deletions
diff --git a/test/modules/http2/test_105_timeout.py b/test/modules/http2/test_105_timeout.py
index d8dada90c4..e107a78fca 100644
--- a/test/modules/http2/test_105_timeout.py
+++ b/test/modules/http2/test_105_timeout.py
@@ -3,11 +3,10 @@ import time
import pytest
-from .env import H2Conf, H2TestEnv
+from .env import H2Conf
from pyhttpd.curl import CurlPiper
-@pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
class TestTimeout:
# Check that base servers 'Timeout' setting is observed on SSL handshake
@@ -129,21 +128,22 @@ class TestTimeout:
def test_h2_105_12(self, env):
# long connection timeout, short stream timeout
# sending a slow POST
- conf = H2Conf(env)
- conf.add_vhost_cgi()
- conf.add("Timeout 10")
- conf.add("H2StreamTimeout 1")
- conf.install()
- assert env.apache_restart() == 0
- url = env.mkurl("https", "cgi", "/h2test/delay?5")
- piper = CurlPiper(env=env, url=url)
- piper.start()
- for _ in range(3):
- time.sleep(2)
- try:
- piper.send("0123456789\n")
- except BrokenPipeError:
- break
- piper.close()
- assert piper.response
- assert piper.response['status'] == 408
+ if env.httpd_is_at_least("2.5.0"):
+ conf = H2Conf(env)
+ conf.add_vhost_cgi()
+ conf.add("Timeout 10")
+ conf.add("H2StreamTimeout 1")
+ conf.install()
+ assert env.apache_restart() == 0
+ url = env.mkurl("https", "cgi", "/h2test/delay?5")
+ piper = CurlPiper(env=env, url=url)
+ piper.start()
+ for _ in range(3):
+ time.sleep(2)
+ try:
+ piper.send("0123456789\n")
+ except BrokenPipeError:
+ break
+ piper.close()
+ assert piper.response
+ assert piper.response['status'] == 408