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:
Stefan Eissing 2025-12-01 12:48:55 +01:00 committed by Viktor Szakats
parent 9cf4a400d2
commit aba3c63ae8
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
4 changed files with 15 additions and 7 deletions

View file

@ -73,8 +73,8 @@ class TestErrors:
invalid_stats = []
for idx, s in enumerate(r.stats):
if 'exitcode' not in s or s['exitcode'] not in [18, 55, 56, 92, 95]:
invalid_stats.append(f'request {idx} exit with {s["exitcode"]}\n{s}')
assert len(invalid_stats) == 0, f'failed: {invalid_stats}'
invalid_stats.append(f'request {idx} exit with {s["exitcode"]}\n{r.dump_logs()}')
assert len(invalid_stats) == 0, f'failed: {invalid_stats}\n{r.dump_logs()}'
# access a resource that, on h2, RST the stream with HTTP_1_1_REQUIRED
@pytest.mark.skipif(condition=not Env.have_h2_curl(), reason="curl without h2")