From a9a21581bdac2966972a445a5e27d90fd938aa8d Mon Sep 17 00:00:00 2001 From: SoXX Date: Wed, 26 Jun 2024 12:40:59 +0200 Subject: [PATCH] test(helper): extend the waiting time to 10 seconds Signed-off-by: SoXX --- test/helper.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/test/helper.go b/test/helper.go index 6fed12e..bb3f057 100644 --- a/test/helper.go +++ b/test/helper.go @@ -3,16 +3,17 @@ package test import ( "context" "database/sql" + "net/url" + "strconv" + "strings" + "time" + "git.dragse.it/anthrove/otter-space-sdk/pkg/models" migrate "github.com/rubenv/sql-migrate" postgrescontainer "github.com/testcontainers/testcontainers-go/modules/postgres" "gorm.io/driver/postgres" "gorm.io/gorm" "gorm.io/gorm/logger" - "net/url" - "strconv" - "strings" - "time" "github.com/testcontainers/testcontainers-go" "github.com/testcontainers/testcontainers-go/wait" @@ -34,7 +35,7 @@ func StartPostgresContainer(ctx context.Context) (*postgrescontainer.PostgresCon postgrescontainer.WithPassword(databasePassword), testcontainers.WithWaitStrategy( wait.ForLog("database system is ready to accept connections"). - WithOccurrence(2).WithStartupTimeout(5*time.Second)), + WithOccurrence(2).WithStartupTimeout(10*time.Second)), ) if err != nil { return nil, nil, err