Skip to content

Commit

Permalink
feat: properly clean postgres servers
Browse files Browse the repository at this point in the history
  • Loading branch information
gfyrag committed Jan 17, 2025
1 parent 7d5aefe commit ab6def2
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions test/performance/env_testserver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
ledgerclient "github.com/formancehq/ledger/pkg/client"
"io"
"os"
"sync"
"testing"

"github.com/formancehq/go-libs/v2/pointer"
Expand Down Expand Up @@ -44,17 +43,11 @@ var _ Env = (*TestServerEnv)(nil)

type TestServerEnvFactory struct {
dockerPool *docker.Pool

once sync.Once
}

func (f *TestServerEnvFactory) Create(ctx context.Context, b *testing.B, ledger ledger.Ledger) Env {

f.once.Do(func() {
// Configure the environment to run benchmarks locally.
// Start a docker connection
f.dockerPool = docker.NewPool(b, logging.Testing())
})
f.dockerPool = docker.NewPool(b, logging.Testing())

pgServer := pgtesting.CreatePostgresServer(b, f.dockerPool, pgtesting.WithPGCrypto())

Expand Down

0 comments on commit ab6def2

Please sign in to comment.