Skip to content

Commit

Permalink
Remove Once() in mock call
Browse files Browse the repository at this point in the history
  • Loading branch information
aditya1702 committed Nov 18, 2024
1 parent a477ab0 commit 9f27e10
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions internal/services/ingest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ func TestTrackRPCServiceHealth_HealthyService(t *testing.T) {
OldestLedger: 1,
LedgerRetentionWindow: 0,
}
mockRPCService.On("GetHealth").Return(healthResult, nil).Once()
mockRPCService.On("GetHealth").Return(healthResult, nil)

go func() {
select {
Expand All @@ -433,7 +433,10 @@ func TestTrackRPCServiceHealth_UnhealthyService(t *testing.T) {
defer cancel()

mockRPCService := &RPCServiceMock{}
mockRPCService.On("GetHealth").Return(entities.RPCGetHealthResult{}, errors.New("rpc error"))
mockRPCService.On("GetHealth").Return(
entities.RPCGetHealthResult{},
errors.New("rpc error"),
)

mockAppTracker := &apptracker.MockAppTracker{}
mockAppTracker.On("CaptureMessage", "rpc service unhealthy for over 1m0s")
Expand Down

0 comments on commit 9f27e10

Please sign in to comment.