synapsecns/sanguine

View on GitHub
core/retry/retry_test.go

Summary

Maintainability
A
3 hrs
Test Coverage

Function TestRetryWithBackoff has 90 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func TestRetryWithBackoff(t *testing.T) {
    // Test a function that succeeds on the first attempt.
    t.Run("Success", func(t *testing.T) {
        err := retry.WithBackoff(context.Background(), func(ctx context.Context) error {
            return nil
Severity: Major
Found in core/retry/retry_test.go - About 2 hrs to fix

    Function TestRetryWithBackoff has 9 return statements (exceeds 4 allowed).
    Open

    func TestRetryWithBackoff(t *testing.T) {
        // Test a function that succeeds on the first attempt.
        t.Run("Success", func(t *testing.T) {
            err := retry.WithBackoff(context.Background(), func(ctx context.Context) error {
                return nil
    Severity: Major
    Found in core/retry/retry_test.go - About 55 mins to fix

      There are no issues that match your filters.

      Category
      Status