tests: use dynamic ports numbers in pytest suite

- necessary ports are bound at start of test suite and then
  given to server fixtures for use.
- this make parallel use of pytest (in separate directories),
  practically safe for use as OS tend to not reuse such port numbers
  for a while

Closes #10692
This commit is contained in:
Stefan Eissing 2023-03-06 16:11:11 +01:00 committed by Daniel Stenberg
parent 257416023d
commit b0564c1d54
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
6 changed files with 118 additions and 39 deletions

View file

@ -79,7 +79,7 @@ class TestErrors:
curl = CurlClient(env=env)
urln = f'https://{env.authority_for(env.domain1, proto)}' \
f'/curltest/tweak?id=[0-{count - 1}]'\
'&chunks=3&chunk_size=16000&body_error=reset'
'&chunks=5&chunk_size=16000&body_error=reset'
r = curl.http_download(urls=[urln], alpn_proto=proto, extra_args=[
'--retry', '0', '--parallel',
])