Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update go-leak tool to avoid problems with false negative results #399

Merged
merged 2 commits into from
Jul 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ require (
github.com/uber/jaeger-client-go v2.21.1+incompatible
github.com/uber/jaeger-lib v2.2.0+incompatible // indirect
go.uber.org/atomic v1.6.0 // indirect
go.uber.org/goleak v1.0.0
golang.org/x/net v0.0.0-20200602114024-627f9648deb9 // indirect
go.uber.org/goleak v1.0.1-0.20200717213025-100c34bdc9d6
golang.org/x/lint v0.0.0-20200302205851-738671d3881b // indirect
golang.org/x/sys v0.0.0-20200610111108-226ff32320da
golang.org/x/tools v0.0.0-20200717024301-6ddee64345a6 // indirect
gonum.org/v1/gonum v0.6.2
google.golang.org/genproto v0.0.0-20200615140333-fd031eab31e7 // indirect
google.golang.org/grpc v1.29.1
Expand Down
23 changes: 19 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ github.com/willf/bitset v1.1.10/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPy
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
github.com/yashtewari/glob-intersection v0.0.0-20180916065949-5c77d914dd0b h1:vVRagRXf67ESqAb72hG2C/ZwI8NtJF2u2V76EsuOHGY=
github.com/yashtewari/glob-intersection v0.0.0-20180916065949-5c77d914dd0b/go.mod h1:HptNXiXVDcJjXe9SqMd0v2FsL9f8dz4GnXgltU6q/co=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/zeebo/errs v1.2.2 h1:5NFypMTuSdoySVTqlNs1dEoU21QVamMQJxW/Fii5O7g=
github.com/zeebo/errs v1.2.2/go.mod h1:sgbWHsvVuTPHcqJJGQ1WhI5KbWlHYz+2+2C/LSEtCw4=
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
Expand All @@ -335,8 +336,8 @@ go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.6.0 h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk=
go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
go.uber.org/goleak v1.0.0 h1:qsup4IcBdlmsnGfqyLl4Ntn3C2XCCuKAE7DwHpScyUo=
go.uber.org/goleak v1.0.0/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A=
go.uber.org/goleak v1.0.1-0.20200717213025-100c34bdc9d6 h1:+os4Rcinl2P8NEQXzKVaoDAkLtTbWHOCKLvGMR0nnWs=
go.uber.org/goleak v1.0.1-0.20200717213025-100c34bdc9d6/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A=
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
Expand All @@ -345,8 +346,11 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200206161412-a0c6ece9d31a h1:aczoJ0HPNE92XKa7DrIzkNN6esOKO2TBwiiYoKcINhA=
golang.org/x/crypto v0.0.0-20200206161412-a0c6ece9d31a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
Expand All @@ -369,10 +373,15 @@ golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHl
golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/lint v0.0.0-20190930215403-16217165b5de h1:5hukYrvBGR8/eNkX5mdUezrA6JiaEZDtJb9Ei+1LlBs=
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/lint v0.0.0-20200302205851-738671d3881b h1:Wh+f8QHJXR411sJR8/vRBTZ7YapZaRvUcLFFJhusH0k=
golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
Expand All @@ -388,8 +397,8 @@ golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn
golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200602114024-627f9648deb9 h1:pNX+40auqi2JqRfOP1akLGtYcn15TUbkhwuCO3foqqM=
golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200625001655-4c5254603344 h1:vGXIOMxbNfDTk/aXCmfdLgkrSV+Z2tcbze+pEc3v5W4=
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
Expand All @@ -399,6 +408,7 @@ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
Expand Down Expand Up @@ -451,7 +461,12 @@ golang.org/x/tools v0.0.0-20191108193012-7d206e10da11 h1:Yq9t9jnGoR+dBuitxdo9l6Q
golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc h1:NCy3Ohtk6Iny5V/reW2Ktypo4zIpWBdRJ1uFMjBxdg8=
golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200717024301-6ddee64345a6 h1:nULzSsKgihxFGLnQFv2T7lE5vIhOtg8ZPpJHapEt7o0=
golang.org/x/tools v0.0.0-20200717024301-6ddee64345a6/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo=
Expand Down
2 changes: 1 addition & 1 deletion pkg/networkservice/common/authorize/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func requestWithToken(token string) *networkservice.NetworkServiceRequest {
}

func TestAuthzEndpoint(t *testing.T) {
defer goleak.VerifyNone(t)
defer goleak.VerifyNone(t, goleak.IgnoreCurrent())
suits := []struct {
name string
policy opa.AuthorizationPolicy
Expand Down
6 changes: 3 additions & 3 deletions pkg/networkservice/common/clientinfo/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func unsetEnvs(envs map[string]string) error {
}

func TestLabelsMapNotPresent(t *testing.T) {
defer goleak.VerifyNone(t)
defer goleak.VerifyNone(t, goleak.IgnoreCurrent())
envs := map[string]string{
"NODE_NAME": "AAA",
"POD_NAME": "BBB",
Expand Down Expand Up @@ -79,7 +79,7 @@ func TestLabelsMapNotPresent(t *testing.T) {
}

func TestLabelsOverwritten(t *testing.T) {
defer goleak.VerifyNone(t)
defer goleak.VerifyNone(t, goleak.IgnoreCurrent())
envs := map[string]string{
"NODE_NAME": "AAA",
"POD_NAME": "BBB",
Expand Down Expand Up @@ -116,7 +116,7 @@ func TestLabelsOverwritten(t *testing.T) {
}

func TestSomeEnvsNotPresent(t *testing.T) {
defer goleak.VerifyNone(t)
defer goleak.VerifyNone(t, goleak.IgnoreCurrent())
envs := map[string]string{
"CLUSTER_NAME": "CCC",
}
Expand Down
6 changes: 3 additions & 3 deletions pkg/networkservice/common/clienturl/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
)

func TestAddURLInEmptyContext(t *testing.T) {
defer goleak.VerifyNone(t)
defer goleak.VerifyNone(t, goleak.IgnoreCurrent())
clientURL := &url.URL{
Scheme: "ipv4",
Path: "192.168.0.1",
Expand All @@ -48,7 +48,7 @@ func TestAddURLInEmptyContext(t *testing.T) {
}

func TestOverwriteURL(t *testing.T) {
defer goleak.VerifyNone(t)
defer goleak.VerifyNone(t, goleak.IgnoreCurrent())
clientURL := &url.URL{
Scheme: "ipv4",
Path: "192.168.0.1",
Expand All @@ -71,7 +71,7 @@ func TestOverwriteURL(t *testing.T) {
}

func TestOverwriteURLByNil(t *testing.T) {
defer goleak.VerifyNone(t)
defer goleak.VerifyNone(t, goleak.IgnoreCurrent())
var clientURL *url.URL = nil
previousURL := &url.URL{
Scheme: "unix",
Expand Down
4 changes: 2 additions & 2 deletions pkg/networkservice/common/connect/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func (nseT *nseTest) newNSEContext(ctx context.Context) context.Context {
}

func TestConnectServerShouldNotPanicOnRequest(t *testing.T) {
defer goleak.VerifyNone(t)
defer goleak.VerifyNone(t, goleak.IgnoreCurrent())

nseT := &nseTest{
t: t,
Expand Down Expand Up @@ -208,7 +208,7 @@ func TestConnectServerShouldNotPanicOnRequest(t *testing.T) {

func TestParallelDial(t *testing.T) {
t.Skip("https://github.com/networkservicemesh/sdk/issues/377")
defer goleak.VerifyNone(t)
defer goleak.VerifyNone(t, goleak.IgnoreCurrent())

nseT := &nseTest{}
nseT.Setup()
Expand Down
10 changes: 5 additions & 5 deletions pkg/networkservice/common/discover/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func fromSomeMiddleAppMatch() *registry.Match {
}

func TestMatchEmptySourceSelector(t *testing.T) {
defer goleak.VerifyNone(t)
defer goleak.VerifyNone(t, goleak.IgnoreCurrent())
nsName := networkServiceName()
nsServer := memory.NewNetworkServiceRegistryServer()
_, err := nsServer.Register(context.Background(), &registry.NetworkService{
Expand Down Expand Up @@ -161,7 +161,7 @@ func TestMatchEmptySourceSelector(t *testing.T) {
}

func TestMatchNonEmptySourceSelector(t *testing.T) {
defer goleak.VerifyNone(t)
defer goleak.VerifyNone(t, goleak.IgnoreCurrent())
nsName := networkServiceName()
nsServer := memory.NewNetworkServiceRegistryServer()
_, err := nsServer.Register(context.Background(), &registry.NetworkService{
Expand Down Expand Up @@ -200,7 +200,7 @@ func TestMatchNonEmptySourceSelector(t *testing.T) {
}

func TestMatchEmptySourceSelectorGoingFirst(t *testing.T) {
defer goleak.VerifyNone(t)
defer goleak.VerifyNone(t, goleak.IgnoreCurrent())
nsName := networkServiceName()
nsServer := memory.NewNetworkServiceRegistryServer()
_, err := nsServer.Register(context.Background(), &registry.NetworkService{
Expand Down Expand Up @@ -238,7 +238,7 @@ func TestMatchEmptySourceSelectorGoingFirst(t *testing.T) {
}

func TestMatchNothing(t *testing.T) {
defer goleak.VerifyNone(t)
defer goleak.VerifyNone(t, goleak.IgnoreCurrent())
nsName := networkServiceName()
nsServer := memory.NewNetworkServiceRegistryServer()
_, err := nsServer.Register(context.Background(), &registry.NetworkService{
Expand Down Expand Up @@ -273,7 +273,7 @@ func TestMatchNothing(t *testing.T) {
}

func TestMatchSelectedNSE(t *testing.T) {
defer goleak.VerifyNone(t)
defer goleak.VerifyNone(t, goleak.IgnoreCurrent())
nsName := networkServiceName()
nsServer := memory.NewNetworkServiceRegistryServer()
_, err := nsServer.Register(context.Background(), &registry.NetworkService{
Expand Down
4 changes: 2 additions & 2 deletions pkg/networkservice/common/filtermechanisms/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func request() *networkservice.NetworkServiceRequest {
}

func TestNewClient_FilterUnixType(t *testing.T) {
defer goleak.VerifyNone(t)
defer goleak.VerifyNone(t, goleak.IgnoreCurrent())
ctx := clienturl.WithClientURL(context.Background(), &url.URL{
Scheme: "unix",
Path: "/var/run/nse-1.sock",
Expand All @@ -93,7 +93,7 @@ func TestNewClient_FilterUnixType(t *testing.T) {
}

func TestNewClient_FilterNonUnixType(t *testing.T) {
defer goleak.VerifyNone(t)
defer goleak.VerifyNone(t, goleak.IgnoreCurrent())
ctx := clienturl.WithClientURL(context.Background(), &url.URL{
Scheme: "ipv4",
Path: "192.168.0.1",
Expand Down
4 changes: 2 additions & 2 deletions pkg/networkservice/common/filtermechanisms/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import (
)

func TestNewServer_FilterUnixType(t *testing.T) {
defer goleak.VerifyNone(t)
defer goleak.VerifyNone(t, goleak.IgnoreCurrent())
ctx := peer.NewContext(context.Background(), &peer.Peer{
Addr: &net.UnixAddr{
Name: "/var/run/nse-1.sock",
Expand Down Expand Up @@ -65,7 +65,7 @@ func TestNewServer_FilterUnixType(t *testing.T) {
}

func TestNewServer_FilterNonUnixType(t *testing.T) {
defer goleak.VerifyNone(t)
defer goleak.VerifyNone(t, goleak.IgnoreCurrent())
ctx := peer.NewContext(context.Background(), &peer.Peer{
Addr: &net.IPAddr{
IP: net.IP{192, 168, 0, 1},
Expand Down
6 changes: 3 additions & 3 deletions pkg/networkservice/common/heal/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func (t *testOnHeal) Close(ctx context.Context, in *networkservice.Connection, o
}

func TestHealClient_Request(t *testing.T) {
defer goleak.VerifyNone(t)
defer goleak.VerifyNone(t, goleak.IgnoreCurrent())
logrus.SetOutput(ioutil.Discard)
eventCh := make(chan *networkservice.ConnectionEvent, 1)
defer close(eventCh)
Expand Down Expand Up @@ -120,7 +120,7 @@ func TestHealClient_Request(t *testing.T) {
}

func TestHealClient_EmptyInit(t *testing.T) {
defer goleak.VerifyNone(t)
defer goleak.VerifyNone(t, goleak.IgnoreCurrent())
logrus.SetOutput(ioutil.Discard)
eventCh := make(chan *networkservice.ConnectionEvent, 1)
defer close(eventCh)
Expand Down Expand Up @@ -158,7 +158,7 @@ func TestHealClient_EmptyInit(t *testing.T) {

func TestNewClient_MissingConnectionsInInit(t *testing.T) {
t.Skip("https://github.com/networkservicemesh/sdk/issues/375")
defer goleak.VerifyNone(t)
defer goleak.VerifyNone(t, goleak.IgnoreCurrent())
logrus.SetOutput(ioutil.Discard)
eventCh := make(chan *networkservice.ConnectionEvent, 1)

Expand Down
8 changes: 4 additions & 4 deletions pkg/networkservice/common/localbypass/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func (s testNetworkServiceServer) Close(ctx context.Context, _ *networkservice.C
}

func TestNewServer_NSENotPresented(t *testing.T) {
defer goleak.VerifyNone(t)
defer goleak.VerifyNone(t, goleak.IgnoreCurrent())
var localBypassRegistryServer registry.NetworkServiceEndpointRegistryServer
localBypassNetworkServiceServer := localbypass.NewServer(&localBypassRegistryServer)
server := next.NewNetworkServiceServer(localBypassNetworkServiceServer, &testNetworkServiceServer{})
Expand All @@ -99,7 +99,7 @@ func TestNewServer_NSENotPresented(t *testing.T) {
}

func TestNewServer_UnixAddressRegistered(t *testing.T) {
defer goleak.VerifyNone(t)
defer goleak.VerifyNone(t, goleak.IgnoreCurrent())
var localBypassRegistryServer registry.NetworkServiceEndpointRegistryServer
localBypassNetworkServiceServer := localbypass.NewServer(&localBypassRegistryServer)
server := next.NewNetworkServiceServer(localBypassNetworkServiceServer, &testNetworkServiceServer{})
Expand Down Expand Up @@ -131,7 +131,7 @@ func TestNewServer_UnixAddressRegistered(t *testing.T) {
}

func TestNewServer_NonUnixAddressRegistered(t *testing.T) {
defer goleak.VerifyNone(t)
defer goleak.VerifyNone(t, goleak.IgnoreCurrent())
var localBypassRegistryServer registry.NetworkServiceEndpointRegistryServer
localBypassNetworkServiceServer := localbypass.NewServer(&localBypassRegistryServer)
server := next.NewNetworkServiceServer(localBypassNetworkServiceServer, &testNetworkServiceServer{})
Expand Down Expand Up @@ -164,7 +164,7 @@ func TestNewServer_NonUnixAddressRegistered(t *testing.T) {
}

func TestNewServer_AddsNothingAfterNSERemoval(t *testing.T) {
defer goleak.VerifyNone(t)
defer goleak.VerifyNone(t, goleak.IgnoreCurrent())
var localBypassRegistryServer registry.NetworkServiceEndpointRegistryServer
localBypassNetworkServiceServer := localbypass.NewServer(&localBypassRegistryServer)
server := next.NewNetworkServiceServer(localBypassNetworkServiceServer, &testNetworkServiceServer{})
Expand Down
10 changes: 5 additions & 5 deletions pkg/networkservice/common/mechanisms/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func permuteOverMechanismPreferenceOrder(request *networkservice.NetworkServiceR
}

func TestSelectMechanism(t *testing.T) {
defer goleak.VerifyNone(t)
defer goleak.VerifyNone(t, goleak.IgnoreCurrent())
logrus.SetOutput(ioutil.Discard)
server := server()
for _, request := range permuteOverMechanismPreferenceOrder(request()) {
Expand All @@ -108,7 +108,7 @@ func TestSelectMechanism(t *testing.T) {
}

func TestDontSelectMechanismIfSet(t *testing.T) {
defer goleak.VerifyNone(t)
defer goleak.VerifyNone(t, goleak.IgnoreCurrent())
logrus.SetOutput(ioutil.Discard)
server := server()
for _, request := range permuteOverMechanismPreferenceOrder(request()) {
Expand All @@ -123,7 +123,7 @@ func TestDontSelectMechanismIfSet(t *testing.T) {
}

func TestUnsupportedMechanismPreference(t *testing.T) {
defer goleak.VerifyNone(t)
defer goleak.VerifyNone(t, goleak.IgnoreCurrent())
logrus.SetOutput(ioutil.Discard)
request := request()
request.MechanismPreferences = []*networkservice.Mechanism{
Expand All @@ -137,7 +137,7 @@ func TestUnsupportedMechanismPreference(t *testing.T) {
}

func TestUnsupportedMechanism(t *testing.T) {
defer goleak.VerifyNone(t)
defer goleak.VerifyNone(t, goleak.IgnoreCurrent())
logrus.SetOutput(ioutil.Discard)
request := request()
request.GetConnection().Mechanism = &networkservice.Mechanism{
Expand All @@ -152,7 +152,7 @@ func TestUnsupportedMechanism(t *testing.T) {
}

func TestDownstreamError(t *testing.T) {
defer goleak.VerifyNone(t)
defer goleak.VerifyNone(t, goleak.IgnoreCurrent())
logrus.SetOutput(ioutil.Discard)
request := request()
request.GetConnection().Mechanism = &networkservice.Mechanism{
Expand Down
2 changes: 1 addition & 1 deletion pkg/networkservice/common/monitor/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
)

func TestMonitor(t *testing.T) {
defer goleak.VerifyNone(t)
defer goleak.VerifyNone(t, goleak.IgnoreCurrent())
// Specify pathSegments to test
segmentNames := []string{"local-nsm", "remote-nsm"}

Expand Down
4 changes: 2 additions & 2 deletions pkg/networkservice/common/refresh/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func firstGetsValueEarlier(c1, c2 <-chan struct{}) bool {

func TestNewClient_StopRefreshAtClose(t *testing.T) {
t.Skip("https://github.com/networkservicemesh/sdk/issues/237")
defer goleak.VerifyNone(t)
defer goleak.VerifyNone(t, goleak.IgnoreCurrent())
requestCh := make(chan struct{}, 1)
testRefresh := &testRefresh{
RequestFunc: func(ctx context.Context, in *networkservice.NetworkServiceRequest, opts ...grpc.CallOption) (connection *networkservice.Connection, err error) {
Expand Down Expand Up @@ -145,7 +145,7 @@ func TestNewClient_StopRefreshAtClose(t *testing.T) {

func TestNewClient_StopRefreshAtAnotherRequest(t *testing.T) {
t.Skip("https://github.com/networkservicemesh/sdk/issues/260")
defer goleak.VerifyNone(t)
defer goleak.VerifyNone(t, goleak.IgnoreCurrent())
requestCh := make(chan struct{}, 1)
testRefresh := &testRefresh{
RequestFunc: func(ctx context.Context, in *networkservice.NetworkServiceRequest, opts ...grpc.CallOption) (connection *networkservice.Connection, err error) {
Expand Down
Loading