From 648dfb83fc91ca463d0846e96b2f2039c828897e Mon Sep 17 00:00:00 2001 From: Kaushik Iska Date: Fri, 26 Jan 2024 09:06:41 -0500 Subject: [PATCH] add leak detection --- flow/e2e/snowflake/peer_flow_sf_test.go | 3 +++ flow/go.mod | 1 + flow/go.sum | 2 ++ 3 files changed, 6 insertions(+) diff --git a/flow/e2e/snowflake/peer_flow_sf_test.go b/flow/e2e/snowflake/peer_flow_sf_test.go index 8f3cf46e7a..69d9f4c17a 100644 --- a/flow/e2e/snowflake/peer_flow_sf_test.go +++ b/flow/e2e/snowflake/peer_flow_sf_test.go @@ -15,6 +15,7 @@ import ( "github.com/jackc/pgx/v5/pgxpool" "github.com/joho/godotenv" "github.com/stretchr/testify/require" + "go.uber.org/goleak" connsnowflake "github.com/PeerDB-io/peer-flow/connectors/snowflake" "github.com/PeerDB-io/peer-flow/connectors/utils" @@ -58,6 +59,8 @@ func (s PeerFlowE2ETestSuiteSF) GetRows(tableName string, sfSelector string) (*m func TestPeerFlowE2ETestSuiteSF(t *testing.T) { e2eshared.RunSuite(t, SetupSuite, func(s PeerFlowE2ETestSuiteSF) { + defer goleak.VerifyNone(t) + e2e.TearDownPostgres(s) if s.sfHelper != nil { diff --git a/flow/go.mod b/flow/go.mod index 8548882df5..7e103e93d9 100644 --- a/flow/go.mod +++ b/flow/go.mod @@ -90,6 +90,7 @@ require ( go.opentelemetry.io/otel/metric v1.22.0 // indirect go.opentelemetry.io/otel/trace v1.22.0 // indirect go.uber.org/atomic v1.11.0 // indirect + go.uber.org/goleak v1.3.0 // indirect golang.org/x/term v0.16.0 // indirect ) diff --git a/flow/go.sum b/flow/go.sum index 911bb2e9b2..d35f282e2e 100644 --- a/flow/go.sum +++ b/flow/go.sum @@ -440,6 +440,8 @@ go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0 go.uber.org/automaxprocs v1.5.3 h1:kWazyxZUrS3Gs4qUpbwo5kEIMGe/DAvi5Z4tl2NW4j8= go.uber.org/automaxprocs v1.5.3/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=