Skip to content

test: prove B2Http outbound calls time out against an unresponsive server - #698

Draft
sophiecarreras wants to merge 1 commit into
masterfrom
qk-timeout-tests
Draft

sophiecarreras wants to merge 1 commit into
masterfrom
qk-timeout-tests

Conversation

@sophiecarreras

Copy link
Copy Markdown
Contributor

Adds unit tests that run every outbound HTTP entry point of B2Http (request, post_content_return_json, post_json_return_json, get_content, head_content) against a real local TCP listener that accepts and never answers. Each call must raise B2RequestTimeout within a bound derived from the shortened class timeouts. A caller-supplied _timeout overriding the default is also covered. No external network or B2 credentials.

Checked by temporarily replacing the timeout= argument of session.request with None: the tests then fail (per-test 30 s limit) instead of passing. Production code is unchanged.

Not covered: connect timeouts (would need an unroutable address).

🤖 Generated with Claude Code

…rver

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 21, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant