From 6c3f37c288da88b5aa37490f0986da88f18797c9 Mon Sep 17 00:00:00 2001 From: Vladimir Popov Date: Wed, 11 Aug 2021 11:50:41 +0700 Subject: [PATCH] Fix Test_ConnectToDeadNSEUsecase Signed-off-by: Vladimir Popov --- pkg/networkservice/chains/nsmgr/suite_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/networkservice/chains/nsmgr/suite_test.go b/pkg/networkservice/chains/nsmgr/suite_test.go index 999fa5bfd..40313b245 100644 --- a/pkg/networkservice/chains/nsmgr/suite_test.go +++ b/pkg/networkservice/chains/nsmgr/suite_test.go @@ -340,7 +340,10 @@ func (s *nsmgrSuite) Test_ConnectToDeadNSEUsecase() { refreshRequest := request.Clone() refreshRequest.Connection = conn.Clone() - _, err = nsc.Request(reqCtx, refreshRequest) + refreshReqCtx, refreshReqCancel := context.WithTimeout(ctx, time.Second) + defer refreshReqCancel() + + _, err = nsc.Request(refreshReqCtx, refreshRequest) require.Error(t, err) require.NoError(t, reqCtx.Err())