]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
test: update http2 test 008_03 for curl allowing the server to send almost all data
authorStefan Eissing <icing@apache.org>
Fri, 14 Jul 2023 08:49:52 +0000 (08:49 +0000)
committerStefan Eissing <icing@apache.org>
Fri, 14 Jul 2023 08:49:52 +0000 (08:49 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1910995 13f79535-47bb-0310-9956-ffa450edef68

test/modules/http2/test_008_ranges.py

index 8bf8a3f161be17d2cd0b4283c48df678c233cd77..339df1a0cc802c2a94110df105c139b39a5b3c07 100644 (file)
@@ -1,11 +1,15 @@
 import inspect
 import json
+import logging
 import os
 import pytest
 
 from .env import H2Conf, H2TestEnv
 
 
+log = logging.getLogger(__name__)
+
+
 @pytest.mark.skipif(condition=H2TestEnv.is_unsupported, reason="mod_http2 not supported here")
 class TestRanges:
 
@@ -115,14 +119,17 @@ class TestRanges:
             '--limit-rate', '2k', '-m', '2'
         ])
         assert r.exit_code != 0, f'{r}'
+        # Restart for logs to be flushed out
+        assert env.apache_restart() == 0
         found = False
         for line in open(TestRanges.LOGFILE).readlines():
             e = json.loads(line)
+            log.info(f'inspecting logged request: {e["request"]}')
             if e['request'] == f'GET {path}?03broken HTTP/2.0':
                 assert e['bytes_rx_I'] > 0
                 assert e['bytes_resp_B'] == 100*1024*1024
                 assert e['bytes_tx_O'] > 1024
-                assert e['bytes_tx_O'] < 10*1024*1024  # curl buffers, but not that much
+                assert e['bytes_tx_O'] < 100*1024*1024  # curl buffers, but not that much
                 found = True
                 break
         assert found, f'request not found in {self.LOGFILE}'