Skip to content

Commit a5b8a59

Browse files
committed
test: add BidsReceived mock expectation in handler test
- Add optional expectation for ReceivedHandler.BidsReceived() call in TestCatchupProviderSlot_WithHandlers test - Ensures mock handler properly handles invocations during slot catchup
1 parent 02c95e3 commit a5b8a59

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

services/bids/standard/handler_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,7 @@ func TestCatchupProviderSlot_WithHandlers(t *testing.T) {
546546
mockDeliveredBidTraceProvider.EXPECT().DeliveredBidTrace(mock.Anything, slot).Return(nil, nil)
547547
mockReceivedBidsSetter.EXPECT().SetMetadata(mock.Anything, metadataKey, mock.Anything).Return(nil)
548548
mockReceivedBidsSetter.EXPECT().CommitTx(mock.Anything).Return(nil)
549+
mockHandler.EXPECT().BidsReceived(mock.Anything, slot).Maybe()
549550

550551
md := &metadata{
551552
LatestSlots: map[string]int64{provider: int64(slot)},

0 commit comments

Comments
 (0)