mirror of
https://github.com/curl/curl.git
synced 2026-08-25 11:33:33 +03:00
pytest: fix and improve reliability
Address issues listed in #19770: - allow for ngttpx to successfully shut down on last attempt that might extend beyond the finish timestamp - timeline checks: allos `time_starttransfer` to appear anywhere in the timeline as a slow client might seen response data before setting the other counters - dump logs on test_05_02 as it was not reproduced locally Fixes #19970 Closes #19783
This commit is contained in:
parent
9cf4a400d2
commit
aba3c63ae8
4 changed files with 15 additions and 7 deletions
|
|
@ -308,13 +308,14 @@ class TestBasic:
|
|||
url = f'https://{env.authority_for(env.domain1, proto)}/curltest/echo'
|
||||
r = curl.http_download(urls=[url], alpn_proto=proto, with_stats=True,
|
||||
extra_args=['-X', method])
|
||||
assert len(r.stats) == 1
|
||||
if proto == 'h2' or proto == 'h3':
|
||||
r.check_response(http_status=0)
|
||||
# h2+3 may close the connection for such invalid requests
|
||||
re_m = re.compile(r'.*\[:method: ([^\]]+)\].*')
|
||||
lines = [line for line in r.trace_lines if re_m.match(line)]
|
||||
assert len(lines) == 1, f'{r.dump_logs()}'
|
||||
m = re_m.match(lines[0])
|
||||
assert m.group(1) == method, f'{r.dump_logs()}'
|
||||
else:
|
||||
# h1 should give us a real response
|
||||
assert len(r.stats) == 1
|
||||
r.check_response(http_status=400)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue