github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/fvm/storage/errors/errors_test.go (about) 1 package errors 2 3 import ( 4 "fmt" 5 "testing" 6 7 "github.com/stretchr/testify/require" 8 ) 9 10 func TestIsRetryablelConflictError(t *testing.T) { 11 require.False(t, IsRetryableConflictError(fmt.Errorf("generic error"))) 12 13 err := NewRetryableConflictError("bad %s", "conflict") 14 require.True(t, IsRetryableConflictError(err)) 15 16 require.True(t, IsRetryableConflictError(fmt.Errorf("wrapped: %w", err))) 17 }