github.com/lazyledger/lazyledger-core@v0.35.0-dev.0.20210613111200-4c651f053571/privval/utils_test.go (about)

     1  package privval
     2  
     3  import (
     4  	"errors"
     5  	"fmt"
     6  	"testing"
     7  
     8  	"github.com/stretchr/testify/assert"
     9  )
    10  
    11  func TestIsConnTimeoutForNonTimeoutErrors(t *testing.T) {
    12  	assert.False(t, IsConnTimeout(fmt.Errorf("max retries exceeded: %w", ErrDialRetryMax)))
    13  	assert.False(t, IsConnTimeout(errors.New("completely irrelevant error")))
    14  }