From b8e4189b77aa9e49c23b1f2cbdeef26d13884243 Mon Sep 17 00:00:00 2001 From: Denis Tingaikin Date: Mon, 24 Jan 2022 07:22:10 +0300 Subject: [PATCH] fix ci Signed-off-by: Denis Tingaikin --- pkg/networkservice/chains/nsmgrproxy/server_test.go | 2 +- pkg/registry/common/connect2/nse_server_test.go | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/pkg/networkservice/chains/nsmgrproxy/server_test.go b/pkg/networkservice/chains/nsmgrproxy/server_test.go index e9d97a5378..d77468a5f1 100644 --- a/pkg/networkservice/chains/nsmgrproxy/server_test.go +++ b/pkg/networkservice/chains/nsmgrproxy/server_test.go @@ -46,7 +46,7 @@ import ( // // nsc -> nsmgr1 -> forwarder1 -> nsmgr1 -> nsmgr-proxy1 -> nsmg-proxy2 -> nsmgr2 ->forwarder2 -> nsmgr2 -> nse3 func TestNSMGR_InterdomainUseCase(t *testing.T) { - //t.Cleanup(func() { goleak.VerifyNone(t) }) + t.Cleanup(func() { goleak.VerifyNone(t) }) ctx, cancel := context.WithTimeout(context.Background(), time.Hour*5) defer cancel() diff --git a/pkg/registry/common/connect2/nse_server_test.go b/pkg/registry/common/connect2/nse_server_test.go index 082677cc5a..cd6c7031dd 100644 --- a/pkg/registry/common/connect2/nse_server_test.go +++ b/pkg/registry/common/connect2/nse_server_test.go @@ -213,6 +213,8 @@ func TestConnectNSEServer_AllDead_WatchingFind(t *testing.T) { ), ) + errCh := make(chan error, 2) + go func() { ch := make(chan *registry.NetworkServiceEndpointResponse, 1) findSrv := streamchannel.NewNetworkServiceEndpointFindServer(clienturlctx.WithClientURL(ctx, url1), ch) @@ -220,7 +222,7 @@ func TestConnectNSEServer_AllDead_WatchingFind(t *testing.T) { NetworkServiceEndpoint: new(registry.NetworkServiceEndpoint), Watch: true, }, findSrv) - require.Error(t, err) + errCh <- err }() go func() { @@ -230,12 +232,15 @@ func TestConnectNSEServer_AllDead_WatchingFind(t *testing.T) { NetworkServiceEndpoint: new(registry.NetworkServiceEndpoint), Watch: true, }, findSrv) - require.Error(t, err) + errCh <- err }() cancel1() cancel2() + require.Error(t, <-errCh) + require.Error(t, <-errCh) + for err, i := goleak.Find(), 0; err != nil && i < 3; err, i = goleak.Find(), i+1 { } }