Skip to content

Commit

Permalink
explanatory comment per CR discussion
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeph Grunschlag committed Aug 2, 2023
1 parent d2e0d3d commit b2e67de
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions conduit/pipeline/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ func TestRetries(t *testing.T) {
y, _, err := Retries(succeedAfter, 0, p, "test")
if tc.retryCount == 0 { // WLOG tc.neverSucceed == false
require.NoError(t, err, tc.name)

// note we subtract 1 from y below because succeedAfter has added 1 to its output
// to disambiguate with the zero value which occurs on failure
require.Equal(t, tc.succeedAfter, y-1, tc.name)
} else { // retryCount > 0 so doesn't retry forever
if tc.neverSucceed || tc.succeedAfter > tc.retryCount {
Expand Down

0 comments on commit b2e67de

Please sign in to comment.