Skip to content

Commit

Permalink
Add timeout to shouldend test
Browse files Browse the repository at this point in the history
  • Loading branch information
sergerad committed May 16, 2023
1 parent 99a1d8a commit d75e370
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion helper/common/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func TestRetryForever_AlwaysReturnError_ShouldNeverEnd(t *testing.T) {
}

func TestRetryForever_ReturnNilAfterFirstRun_ShouldEnd(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
ctx, cancel := context.WithTimeout(context.Background(), time.Second)
RetryForever(ctx, time.Millisecond*100, func(ctx context.Context) error {
select {
case <-ctx.Done():
Expand Down

0 comments on commit d75e370

Please sign in to comment.