From 2968cce9902a29b347b57643a7c182b4b6fa6213 Mon Sep 17 00:00:00 2001 From: Lavysh Alexander Date: Mon, 25 Sep 2023 11:50:02 +0300 Subject: [PATCH] Incresed startup timeout for ceating postgres container. --- database/container.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/database/container.go b/database/container.go index 42997ff..ffb8e12 100644 --- a/database/container.go +++ b/database/container.go @@ -44,7 +44,10 @@ func NewPostgreSQLContainer(ctx context.Context, cfg PostgreSQLContainerConfig) postgres.WithDatabase(cfg.Database), postgres.WithUsername(cfg.User), postgres.WithPassword(cfg.Password), - testcontainers.WithWaitStrategy(wait.ForLog("database system is ready to accept connections").WithOccurrence(2).WithStartupTimeout(5*time.Second)), + testcontainers.WithWaitStrategy( + wait.ForLog("database system is ready to accept connections"). + WithOccurrence(2). + WithStartupTimeout(30*time.Second)), ) if err != nil { return nil, err