Skip to content

Add default wait strategy hook#1340

Open
cristianrgreco wants to merge 2 commits into
mainfrom
codex/default-wait-healthcheck
Open

Add default wait strategy hook#1340
cristianrgreco wants to merge 2 commits into
mainfrom
codex/default-wait-healthcheck

Conversation

@cristianrgreco
Copy link
Copy Markdown
Collaborator

@cristianrgreco cristianrgreco commented May 26, 2026

Summary

  • Add an optional protected getDefaultWaitStrategy() hook for container subclasses.
  • Let the wait strategy selector use that fallback after explicit wait strategies and healthchecks have been considered.
  • Document the hook for custom GenericContainer subclasses.

Verification

  • npm run test -- packages/testcontainers/src/wait-strategies/utils/wait-strategy-selector.test.ts
  • npm run check-compiles
  • npm run lint
  • npm run format
  • git diff --check

Test Results

All listed checks passed locally.

Semver Impact

Minor. This adds a backward-compatible protected hook for subclasses without changing existing explicit wait strategy or healthcheck precedence. Existing containers still default to Wait.forListeningPorts() when no explicit/default wait strategy or healthcheck is available.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 26, 2026

Deploy Preview for testcontainers-node ready!

Name Link
🔨 Latest commit 3a2f5ec
🔍 Latest deploy log https://app.netlify.com/projects/testcontainers-node/deploys/6a15ba8e0f5271000854e106
😎 Deploy Preview https://deploy-preview-1340--testcontainers-node.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@cristianrgreco cristianrgreco added enhancement New feature or request minor Backward compatible functionality labels May 26, 2026 — with ChatGPT Codex Connector
@cristianrgreco cristianrgreco force-pushed the codex/default-wait-healthcheck branch from 2361243 to 2779730 Compare May 26, 2026 10:31
@cristianrgreco cristianrgreco changed the title Add default wait strategy hook and Podman healthcheck detection Add default wait strategy hook May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request minor Backward compatible functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant