Skip to content

Default to HealthCheckWaitStrategy for containers with health checks defined #687

@jalaziz

Description

@jalaziz

Expected Behaviour

For containers or compose services with health checks defined, the default wait strategy should be the HealthCheckWaitStrategy.

This would be particularly useful for compose projects where many services can be defined and health checks can be defined directly in the compose config.

Actual Behaviour

The default wait strategy is the HostPortWaitStrategy which is not always applicable. While we can override the health check manually, it would be great if testcontainers could automatically use the best strategy.

Testcontainer Logs
...

Environment Information

  • Operating System: Ubuntu 22.04
  • Docker Version: 24.0.7
  • Node version: 18.18.2
  • Testcontainers version: 10.3.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions