Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
zsystm committed Sep 19, 2024
1 parent f74d290 commit 0fa02cf
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions client/x/evmengine/keeper/helpers_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,14 @@ func TestRetryForever(t *testing.T) {
expectedAttempts int
}{
{
name: "Success after retries",
ctxFunc: func() context.Context {
return context.Background()
},
name: "Success after retries",
ctxFunc: context.Background,
fn: func(ctx context.Context) (bool, error) {
attempts++
if attempts < 3 {
return false, nil // Retry
}

return true, nil // Success
},
expectedErr: "",
Expand All @@ -39,6 +38,7 @@ func TestRetryForever(t *testing.T) {
ctxFunc: func() context.Context {
ctx, cancel := context.WithCancel(context.Background())
cancel() // Cancel immediately

return ctx
},
fn: func(ctx context.Context) (bool, error) {
Expand All @@ -47,10 +47,8 @@ func TestRetryForever(t *testing.T) {
expectedErr: "retry canceled",
},
{
name: "Func returns error",
ctxFunc: func() context.Context {
return context.Background()
},
name: "Func returns error",
ctxFunc: context.Background,
fn: func(ctx context.Context) (bool, error) {
return false, errors.New("some error")
},
Expand Down

0 comments on commit 0fa02cf

Please sign in to comment.