Skip to content

FOLLOW-UP: Add timeout to HTTP readiness probes in progressive-enhancement tests #61

@adnaan

Description

@adnaan

Context

This follow-up task was identified during the review of PR #57.

Source PR: #57
PR Title: refactor: consolidate DevMode blocks with defer, enable skipped test suites
Suggested by: @copilot-pull-request-reviewer
Files: progressive-enhancement/progressive_enhancement_test.go:56 and :620

Task Description

Two server readiness loops use http.Get with the default client (no timeout). If a connection attempt stalls, this can hang the test process in CI.

Fix both locations:

  1. setupServer() (line ~56): Use &http.Client{Timeout: 2 * time.Second} for the probe requests
  2. TestProgressiveEnhancement_DisabledReturnsJSON (line ~620): Same fix

This issue was automatically created from PR review comments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    follow-upFollow-up task from PR reviewfrom-reviewIssue originated from PR review

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions