Skip to content

fix: increase integration test timeouts for Docker image pulls in CI#5118

Merged
lpcox merged 1 commit intomainfrom
fix/integration-test-timeouts-ci
May 4, 2026
Merged

fix: increase integration test timeouts for Docker image pulls in CI#5118
lpcox merged 1 commit intomainfrom
fix/integration-test-timeouts-ci

Conversation

@lpcox
Copy link
Copy Markdown
Collaborator

@lpcox lpcox commented May 4, 2026

Problem

TestBinaryInvocation_LogFileCreation and TestDIFCConfigWithGuards fail in CI because Docker images (alpine:latest, mcp/playwright:latest) are not pre-pulled, and the time to pull them exceeds the short test timeouts (5s and 15s respectively).

See: https://github.com/github/gh-aw-mcpg/actions/runs/25325915594/job/74247185258

Root Cause

NewUnified() calls registerAllTools() which launches Docker containers and waits for them to connect. The HTTP listener only starts AFTER NewUnified returns, so /health isn't available until all backends finish connecting (or timeout). In CI, Docker image pulls add 15-30s, exceeding the test timeouts.

Fix

Increase timeouts to accommodate Docker pulls in CI:

  • TestBinaryInvocation_LogFileCreation: 5s → 40s (context 10s → 45s)
  • TestBinaryInvocation_LogDirEnvironmentVariable: 5s → 40s (context 10s → 45s)
  • TestDIFCConfigWithGuards: 15s → 50s (context 30s → 60s)

These timeouts are generous enough for slow CI environments while still catching real startup failures.

TestBinaryInvocation_LogFileCreation and TestDIFCConfigWithGuards fail
in CI because Docker images (alpine:latest, mcp/playwright:latest) are
not pre-pulled and the pull time exceeds the short test timeouts (5s and
15s respectively).

Increase timeouts to accommodate Docker pulls:
- TestBinaryInvocation_LogFileCreation: 5s → 40s (context 10s → 45s)
- TestBinaryInvocation_LogDirEnvironmentVariable: 5s → 40s (context 10s → 45s)
- TestDIFCConfigWithGuards: 15s → 50s (context 30s → 60s)

Fixes: https://github.com/github/gh-aw-mcpg/actions/runs/25325915594

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 4, 2026 18:06
Copy link
Copy Markdown
Contributor

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 adjusts a few slow-start integration tests so they remain reliable in CI when Docker images need to be pulled before the gateway becomes healthy. It fits the test suite by addressing startup timing assumptions rather than changing runtime behavior.

Changes:

  • Increased subprocess context deadlines for two binary integration tests and one DIFC/guards integration test.
  • Increased startup wait windows used by /health polling or stderr-based startup detection.
  • Updated nearby test comments to document that the extra time is intended to absorb Docker image pull latency in CI.
Show a summary per file
File Description
test/integration/difc_config_test.go Extends the guarded DIFC startup timeout and stderr wait window for slower CI container pulls.
test/integration/binary_test.go Extends startup and process context timeouts for the log file integration tests that launch Docker-backed backends.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/2 changed files
  • Comments generated: 0

@lpcox lpcox merged commit 62b9ca0 into main May 4, 2026
26 checks passed
@lpcox lpcox deleted the fix/integration-test-timeouts-ci branch May 4, 2026 18:41
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