From: Stefan Eissing Date: Fri, 14 Nov 2025 15:26:14 +0000 (+0100) Subject: test07_22: fix flakiness X-Git-Tag: rc-8_18_0-1~294 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f37c956d0f6a05081bc6d05d9f5fe7fe9843ef98;p=thirdparty%2Fcurl.git test07_22: fix flakiness The HTTP/3 tests did send 20 transfers against nghttpx with a backend that failed the uploads with a 400 and an incomplete response body. This causes stream resets. Apache keeps the connection open, but newer nghttpx closes the front connection after "too many" reset. When that bites, it depends on the number of transfers ongoing how the test case fails. This led to flaky outcomes. Reduce the transfers to just a single one and check the result of that one. Parallelism is not important here. refs #19489 Closes #19530 --- diff --git a/tests/http/test_07_upload.py b/tests/http/test_07_upload.py index ad2db48a8c..93d1fb26bf 100644 --- a/tests/http/test_07_upload.py +++ b/tests/http/test_07_upload.py @@ -263,15 +263,18 @@ class TestUpload: r.check_response(count=count, http_status=200) self.check_download(r, count, fdata, curl) - # upload large data parallel to a URL that denies uploads + # upload single large data to a URL that fails uploads, causing RESETs + # (We used to do this for 20 parallel transfers, but the triggered + # stream resets make nghttpx drop the connection after several, which + # then gives a non-deterministic number of completely failed transfers) @pytest.mark.parametrize("proto", ['h2', 'h3']) - def test_07_22_upload_parallel_fail(self, env: Env, httpd, nghttpx, proto): + def test_07_22_upload_fail(self, env: Env, httpd, nghttpx, proto): if proto == 'h2' and not env.have_h2_curl(): pytest.skip("h2 not supported") if proto == 'h3' and not env.have_h3(): pytest.skip("h3 not supported") fdata = os.path.join(env.gen_dir, 'data-10m') - count = 20 + count = 1 curl = CurlClient(env=env) url = f'https://{env.authority_for(env.domain1, proto)}'\ f'/curltest/tweak?status=400&delay=5ms&chunks=1&body_error=reset&id=[0-{count-1}]'