github.com/nspcc-dev/neo-go@v0.105.2-0.20240517133400-6be757af3eba/pkg/rpcclient/local_test.go (about)

     1  package rpcclient
     2  
     3  import (
     4  	"context"
     5  	"testing"
     6  
     7  	"github.com/nspcc-dev/neo-go/pkg/neorpc"
     8  	"github.com/stretchr/testify/require"
     9  )
    10  
    11  func TestInternalClientClose(t *testing.T) {
    12  	icl, err := NewInternal(context.TODO(), func(ctx context.Context, ch chan<- neorpc.Notification) func(*neorpc.Request) (*neorpc.Response, error) {
    13  		return nil
    14  	})
    15  	require.NoError(t, err)
    16  	icl.Close()
    17  	require.NoError(t, icl.GetError())
    18  }