]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tests/http: relax connection check in test_07_02
authorStefan Eissing <stefan@eissing.org>
Thu, 30 Mar 2023 14:30:40 +0000 (16:30 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 30 Mar 2023 21:51:16 +0000 (23:51 +0200)
Only 1 connection will be used when curl is slow, happens when
address-sanitized in CI, for example

Closes #10865

tests/http/test_02_download.py

index a0ae8a820993f6635c6070c9e68a307ee109c84f..4b131594b528a3353bad3a9a43f17a38b6f1f223 100644 (file)
@@ -159,8 +159,10 @@ class TestDownload:
         ])
         r.check_exit_code(0)  
         r.check_stats(count=count, exp_status=200)
-        # should have used 2 connections only (test servers allow 100 req/conn)
-        assert r.total_connects == 2, "h2 should use fewer connections here"
+        # should have used at most 2 connections only (test servers allow 100 req/conn)
+        # it may be just 1 on slow systems where request are answered faster than
+        # curl can exhaust the capacity or if curl runs with address-sanitizer speed
+        assert r.total_connects <= 2, "h2 should use fewer connections here"
 
     # download files parallel with http/1.1, check connection not reused
     @pytest.mark.parametrize("proto", ['http/1.1'])