Skip to content

Update timeout configuration to use time.Duration for consistency#53

Merged
paskal merged 1 commit intomasterfrom
fix_timeouts
Mar 22, 2025
Merged

Update timeout configuration to use time.Duration for consistency#53
paskal merged 1 commit intomasterfrom
fix_timeouts

Conversation

@paskal
Copy link
Copy Markdown
Member

@paskal paskal commented Mar 22, 2025

No description provided.

@paskal paskal requested a review from Copilot March 22, 2025 23:15
@paskal paskal merged commit 21138a3 into master Mar 22, 2025
@paskal paskal deleted the fix_timeouts branch March 22, 2025 23:15
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the timeout configuration across various modules to use time.Duration for consistency. It also refactors tests to use table-driven subtests for improved clarity and coverage.

  • Updated UReadability instantiation in production and test code to use time.Duration.
  • Refactored tests in readability_test.go to adopt table-driven subtests for multiple URL scenarios.
  • Revised all timeout specifications in backend/main.go, backend/rest/server_test.go, and extractor packages for consistency.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
backend/extractor/readability_test.go Updated timeout configuration and refactored tests into a table-driven approach.
backend/main.go Changed timeout from an integer value to a proper time.Duration for UReadability.
backend/rest/server_test.go Updated timeout definitions to reflect the new time.Duration configuration.
backend/extractor/readability.go Removed unnecessary multiplication with time.Second, relying directly on the already set time.Duration.
backend/extractor/pics_test.go & pics.go Ensured timeout fields use time.Duration consistently.

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.

2 participants