Skip to content

Close three test gaps in the hosting layer #87

Description

@matt-edmondson

Three gaps found during Phase 5b review (#80), grouped because each is small.

FakeHttpMessageHandler._responses is a plain Queue. The sibling _requests field was changed to a ConcurrentQueue because nothing stops a provider issuing two requests through one handler at once. That reasoning applies verbatim to _responses, which is still read and dequeued inside SendAsync. Test-only, and both providers await sequentially, so there is no live race. The fix is narrower than its own justification.

No test covers an HTTP-date Retry-After. GitHubProvider.TryGetRetryAfterSeconds parses the header as an integer, so an HTTP-date value yields null and ResetsAt is left unset. That is correct by inspection and documented, but unpinned.

The header-routing fallback throw in FakeHttpMessageHandler is unreachable. TryAddWithoutValidation accepts virtually any name and value, so the throw beneath it cannot fire. Harmless defensive code, but it is untested and will stay that way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions