Skip to content

Commit 9aac69d

Browse files
lesnik512claude
andcommitted
test(resilience): assert sleep count in timeout retry test (symmetry with network test)
test_retries_on_network_error already asserts len(sleeper.calls) == 1; the matching timeout test didn't, so a regression bypassing backoff on the TimeoutError branch would go undetected. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 64a2671 commit 9aac69d

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎tests/test_retry.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ def handler(request: httpx2.Request) -> httpx2.Response:
190190
response = await client.get("https://example.test/x")
191191
assert response.status_code == HTTPStatus.OK
192192
assert call_count["n"] == 2 # noqa: PLR2004 — "2" is intentional literal in test assertion
193+
assert len(sleeper.calls) == 1
193194

194195

195196
async def test_does_not_retry_on_bare_transport_error_like_invalid_url() -> None:

0 commit comments

Comments
 (0)