Skip to content

Commit 2968cce

Browse files
committed
Incresed startup timeout for ceating postgres container.
1 parent 3747a54 commit 2968cce

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

database/container.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ func NewPostgreSQLContainer(ctx context.Context, cfg PostgreSQLContainerConfig)
4444
postgres.WithDatabase(cfg.Database),
4545
postgres.WithUsername(cfg.User),
4646
postgres.WithPassword(cfg.Password),
47-
testcontainers.WithWaitStrategy(wait.ForLog("database system is ready to accept connections").WithOccurrence(2).WithStartupTimeout(5*time.Second)),
47+
testcontainers.WithWaitStrategy(
48+
wait.ForLog("database system is ready to accept connections").
49+
WithOccurrence(2).
50+
WithStartupTimeout(30*time.Second)),
4851
)
4952
if err != nil {
5053
return nil, err

0 commit comments

Comments
 (0)