chore: remove wait strategy, it's handled by the module

This commit is contained in:
Manuel de la Peña
2025-04-28 10:40:13 +02:00
parent 5a5580e0a1
commit aece23fe66

View File

@@ -11,7 +11,6 @@ import (
"github.com/testcontainers/testcontainers-go"
"github.com/testcontainers/testcontainers-go/modules/redis"
"github.com/testcontainers/testcontainers-go/wait"
)
const (
@@ -90,10 +89,6 @@ func newConfigFromContainer(t testing.TB, opts ...testStoreOption) Config {
tcOpts := []testcontainers.ContainerCustomizer{}
waitStrategies := []wait.Strategy{
wait.ForListeningPort(redisPort).WithStartupTimeout(time.Second * 10),
}
if settings.withTLS {
tcOpts = append(tcOpts, redis.WithTLS())
@@ -116,8 +111,6 @@ func newConfigFromContainer(t testing.TB, opts ...testStoreOption) Config {
tcOpts = append(tcOpts, testcontainers.WithCmd(cmds...))
}
tcOpts = append(tcOpts, testcontainers.WithWaitStrategy(waitStrategies...))
c, err := redis.Run(ctx, img, tcOpts...)
testcontainers.CleanupContainer(t, c)
require.NoError(t, err)