Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ferglor committed Jul 3, 2024
1 parent 2815d37 commit 1708ce2
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ func TestLogEventBufferV1(t *testing.T) {
logpoller.Log{BlockNumber: 2, TxHash: common.HexToHash("0x2"), LogIndex: 0},
logpoller.Log{BlockNumber: 2, TxHash: common.HexToHash("0x1"), LogIndex: 2},
)
results, remaining := buf.Dequeue(int64(1), 10, 1, 2, false)
results, remaining := buf.Dequeue(int64(1), 10, 1, 2, true)
require.Equal(t, 2, len(results))
require.Equal(t, 2, remaining)
require.True(t, results[0].ID.Cmp(results[1].ID) != 0)
results, remaining = buf.Dequeue(int64(1), 10, 1, 2, false)
results, remaining = buf.Dequeue(int64(1), 10, 1, 2, true)
require.Equal(t, 0, len(results))
require.Equal(t, 0, remaining)
}
Expand Down Expand Up @@ -217,7 +217,7 @@ func TestLogEventBufferV1_Dequeue(t *testing.T) {
}
start, end := getBlockWindow(tc.args.block, tc.args.blockRate)

results, remaining := buf.Dequeue(start, end, tc.args.upkeepLimit, tc.args.maxResults, false)
results, remaining := buf.Dequeue(start, end, tc.args.upkeepLimit, tc.args.maxResults, true)
require.Equal(t, len(tc.results), len(results))
require.Equal(t, tc.remaining, remaining)
})
Expand Down

0 comments on commit 1708ce2

Please sign in to comment.