Skip to content

Configure a reasonable default HTTP timeout - #21

Merged
bamnet merged 4 commits into
masterfrom
issue-17-http-timeout
Jun 29, 2026
Merged

Configure a reasonable default HTTP timeout#21
bamnet merged 4 commits into
masterfrom
issue-17-http-timeout

Conversation

@bamnet-bot

Copy link
Copy Markdown
Collaborator

Fixes #17

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a default timeout of 30 seconds to the HTTP client in NewClient and adds comprehensive unit tests in client_test.go to verify the timeout configurations and the fetch method. Feedback includes a recommendation to use keyed fields when initializing the Client struct in client.go for better readability and future-proofing, as well as adding a missing newline at the end of client_test.go to comply with standard Go formatting.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread client.go Outdated
Comment thread client_test.go Outdated
@codecov

codecov Bot commented Jun 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.91%. Comparing base (6d352a0) to head (12285fa).

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #21      +/-   ##
==========================================
+ Coverage   85.01%   85.91%   +0.89%     
==========================================
  Files           5        5              
  Lines         287      291       +4     
==========================================
+ Hits          244      250       +6     
+ Misses         26       24       -2     
  Partials       17       17              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bamnet
bamnet merged commit 8371954 into master Jun 29, 2026
3 checks passed
@bamnet-bot
bamnet-bot deleted the issue-17-http-timeout branch June 29, 2026 04:38
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.

Configure a reasonable default HTTP timeout

2 participants