mirror of
https://github.com/usestrix/strix.git
synced 2026-10-13 03:57:59 +00:00
test: let the blocked-provider test run out of 4xx retries
This commit is contained in:
parent
37832bc465
commit
c3fc173137
1 changed files with 5 additions and 1 deletions
|
|
@ -96,8 +96,12 @@ async def test_blocked_provider_failure_text_carries_request_id(
|
|||
monkeypatch: pytest.MonkeyPatch,
|
||||
) -> None:
|
||||
coordinator = AgentCoordinator()
|
||||
# 4xx errors are retried, so the block repeats until retries run out.
|
||||
streams = [
|
||||
_FakeStream(exc=_blocked_error()) for _ in range(execution._MAX_TRANSIENT_MODEL_RETRIES + 1)
|
||||
]
|
||||
with pytest.raises(PermissionDeniedError):
|
||||
await _run(monkeypatch, [_FakeStream(exc=_blocked_error())], coordinator)
|
||||
await _run(monkeypatch, streams, coordinator)
|
||||
assert coordinator.statuses["root"] == "failed"
|
||||
error = coordinator.errors["root"]
|
||||
assert "Output blocked by policy" in error
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue