diff --git a/pkg/networkservice/common/connect/server_cancel_test.go b/pkg/networkservice/common/connect/server_cancel_test.go index 56708b50d8..6e8022e963 100644 --- a/pkg/networkservice/common/connect/server_cancel_test.go +++ b/pkg/networkservice/common/connect/server_cancel_test.go @@ -50,10 +50,9 @@ func TestConnect_CancelDuringRequest(t *testing.T) { ctx, cancel := context.WithTimeout(context.Background(), time.Second) defer cancel() - domain := sandbox.NewBuilder(t). + domain := sandbox.NewBuilder(ctx, t). SetNodesCount(1). SetRegistryProxySupplier(nil). - SetContext(ctx). Build() service1Name := "my-service-endpoint" @@ -74,12 +73,11 @@ func TestConnect_CancelDuringRequest(t *testing.T) { } nscCtx, nscCancel := context.WithCancel(ctx) var flag atomic.Bool - _, err = domain.Nodes[0].NewEndpoint(ctx, nseReg1, sandbox.GenerateTestToken, checkrequest.NewServer(t, func(*testing.T, *networkservice.NetworkServiceRequest) { + domain.Nodes[0].NewEndpoint(ctx, nseReg1, sandbox.GenerateTestToken, checkrequest.NewServer(t, func(*testing.T, *networkservice.NetworkServiceRequest) { if flag.Load() { nscCancel() } })) - require.NoError(t, err) var counter atomic.Int32 ptClient := newPassTroughClient(service1Name) @@ -98,7 +96,7 @@ func TestConnect_CancelDuringRequest(t *testing.T) { Name: "endpoint-2", NetworkServiceNames: []string{service2Name}, } - _, err = domain.Nodes[0].NewEndpoint(ctx, nseReg2, sandbox.GenerateTestToken, + domain.Nodes[0].NewEndpoint(ctx, nseReg2, sandbox.GenerateTestToken, chain.NewNetworkServiceServer( clienturl.NewServer(domain.Nodes[0].NSMgr.URL), connect.NewServer(ctx, @@ -108,7 +106,6 @@ func TestConnect_CancelDuringRequest(t *testing.T) { ), ), ) - require.NoError(t, err) request := &networkservice.NetworkServiceRequest{ MechanismPreferences: []*networkservice.Mechanism{