From: Stefan Eissing Date: Thu, 30 Mar 2023 13:25:14 +0000 (+0200) Subject: tests: make test_12_01 a bit more forgiving on connection counts X-Git-Tag: curl-8_1_0~162 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5126cbda004c3d2bf87e490f4cc89e7ce807e071;p=thirdparty%2Fcurl.git tests: make test_12_01 a bit more forgiving on connection counts --- diff --git a/tests/http/test_12_reuse.py b/tests/http/test_12_reuse.py index 302929956c..83bfadfe4a 100644 --- a/tests/http/test_12_reuse.py +++ b/tests/http/test_12_reuse.py @@ -56,7 +56,8 @@ class TestReuse: r.check_response(count=count, http_status=200) # Server sends `Connection: close` on every 2nd request, requiring # a new connection - assert r.total_connects == count/2 + delta = 5 + assert (count/2 - delta) < r.total_connects < (count/2 + delta) @pytest.mark.parametrize("proto", ['http/1.1']) def test_12_02_h1_conn_timeout(self, env: Env, @@ -75,7 +76,3 @@ class TestReuse: r.check_response(count=count, http_status=200) # Connections time out on server before we send another request, assert r.total_connects == count - # we do not see how often a request was retried in the stats, so - # we cannot check that connection reuse attempted a connection that - # was later detected to be "dead". We would like to - # assert stat['retry_count'] == 0