From e3041fc4a0fb49ab06491c3f861db3e58fb8aa1a Mon Sep 17 00:00:00 2001 From: Taimoor Zaeem Date: Wed, 12 Mar 2025 20:50:55 +0500 Subject: [PATCH] test: correct jwt parse time test --- test/io/test_io.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/io/test_io.py b/test/io/test_io.py index ad6c4881a..ddcc9b4f3 100644 --- a/test/io/test_io.py +++ b/test/io/test_io.py @@ -1453,8 +1453,9 @@ def test_jwt_cache_server_timing(defaultenv): first_dur = parse_server_timings_header(first.headers["Server-Timing"])["jwt"] second_dur = parse_server_timings_header(second.headers["Server-Timing"])["jwt"] - assert first_dur >= 0 - assert second_dur >= 0 + # with jwt caching the parse time of second request with the same token + # should be at least as fast as the first one + assert second_dur <= first_dur def test_jwt_cache_without_server_timing(defaultenv):