From: Stefan Eissing Date: Fri, 17 Oct 2025 09:48:35 +0000 (+0200) Subject: test_16: adjust timing expectations X-Git-Tag: rc-8_17_0-3~150 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2719aa36b5cf7e638b1b4a0e5c69eb3068d5689d;p=thirdparty%2Fcurl.git 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 --- diff --git a/tests/http/test_16_info.py b/tests/http/test_16_info.py index ac4f4cc866..53e335e950 100644 --- a/tests/http/test_16_info.py +++ b/tests/http/test_16_info.py @@ -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}'