Skip to content

Commit

Permalink
one last check
Browse files Browse the repository at this point in the history
  • Loading branch information
deankarn committed Mar 25, 2024
1 parent 2a85746 commit 02faf3a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions errors/retrier_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,12 @@ func TestRetrierEarlyReturn(t *testing.T) {
Equal(t, isRetryableCount, 5)

// while here let's check the first test case again, `Retrier` should be a copy and original still intact.
isRetryableCount = 0
result = r.Do(context.Background(), func(ctx context.Context) Result[int, error] {
return Err[int, error](io.EOF)
})
Equal(t, result.IsErr(), true)
Equal(t, result.Err(), io.EOF)
Equal(t, earlyReturnCount, 1)
Equal(t, isRetryableCount, 0)
}

0 comments on commit 02faf3a

Please sign in to comment.