Skip to content

Commit

Permalink
Merge pull request #22 from dipdup-io/increase-timeout-for-postgres-c…
Browse files Browse the repository at this point in the history
…ontainer

Incresed startup timeout for ceating postgres container.
  • Loading branch information
vvuwei authored Sep 25, 2023
2 parents 3747a54 + 2968cce commit 14f31d2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion database/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 14f31d2

Please sign in to comment.