mirror of
https://github.com/curl/curl.git
synced 2026-07-16 04:47:21 +03:00
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
This commit is contained in:
parent
3d91ca8cdb
commit
f37c956d0f
1 changed files with 6 additions and 3 deletions
|
|
@ -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}]'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue