mirror of
https://github.com/curl/curl.git
synced 2026-07-24 11:37:21 +03:00
test_16: adjust timing expectations
In MOST protocols and runs, the 'pretransfer' time is less than the 'starttransfer'. E.g. request being sent before response comes in. However, when curl is starved of cpu a server response might start streaming in before the multi-state transitioned to DID (and recorded the 'pretransfer' time). Do no longer check that 'pretransfer' is less or equal 'starttransfer'. Check that is is less or equal to the total time instead. Closes #19096
This commit is contained in:
parent
e2a4de8a60
commit
2719aa36b5
1 changed files with 6 additions and 3 deletions
|
|
@ -160,9 +160,12 @@ class TestInfo:
|
|||
for key in ['time_appconnect', 'time_connect', 'time_namelookup']:
|
||||
assert s[key] < s['time_pretransfer'], f'time "{key}" larger than' \
|
||||
f'"time_pretransfer": {s}'
|
||||
# assert transfer start is after pretransfer
|
||||
assert s['time_pretransfer'] <= s['time_starttransfer'], f'"time_pretransfer" '\
|
||||
f'greater than "time_starttransfer", {s}'
|
||||
# assert transfer total is after pretransfer.
|
||||
# (in MOST situations, pretransfer is before starttransfer, BUT
|
||||
# in protocols like HTTP we might get a server response already before
|
||||
# we transition to multi state DID.)
|
||||
assert s['time_pretransfer'] <= s['time_total'], f'"time_pretransfer" '\
|
||||
f'greater than "time_total", {s}'
|
||||
# assert that transfer start is before total
|
||||
assert s['time_starttransfer'] <= s['time_total'], f'"time_starttransfer" '\
|
||||
f'greater than "time_total", {s}'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue