testcontainers-go icon indicating copy to clipboard operation
testcontainers-go copied to clipboard

[Feature]: Hold open a connection to ryuk during a call to Up

Open maxmzkr opened this issue 1 year ago • 2 comments

Problem

When using the compose module and the services take a bit to start up, the ryuk container will timeout and close during the call to Up.

Examples in https://github.com/testcontainers/testcontainers-go/issues/2618 https://github.com/testcontainers/testcontainers-go/issues/2563

Solution

Hold a connection to the ryuk container during the lifetime of the Up call.

Benefit

More complex or longer start up time docker compose files will be able to start without requiring users to set higher timeout configurations.

Alternatives

Increasing the ryuk connection/reconnect timeouts. This would help, but it requires every runner of the test to know to set the higher timeout. Because we know we don't want to close the ryuk container while Up is being run, it makes sense to make it work without the need for configuration changes.

Would you like to help contributing this feature?

Yes

maxmzkr avatar Jul 02 '24 18:07 maxmzkr