Skip to content

Commit

Permalink
fix race in TestBidValidatorAuctioneerRedisStream
Browse files Browse the repository at this point in the history
  • Loading branch information
ganeshvanahalli committed Dec 23, 2024
1 parent a449e92 commit 1837035
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions timeboost/auctioneer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,9 @@ func TestBidValidatorAuctioneerRedisStream(t *testing.T) {

// We verify that the auctioneer has consumed all validated bids from the single Redis stream.
// We also verify the top two bids are those we expect.
am.bidCache.Lock()
require.Equal(t, 3, len(am.bidCache.bidsByExpressLaneControllerAddr))
am.bidCache.Unlock()
result := am.bidCache.topTwoBids()
require.Equal(t, big.NewInt(7), result.firstPlace.Amount) // Best bid should be Charlie's last bid 7
require.Equal(t, charlieAddr, result.firstPlace.Bidder)
Expand Down

0 comments on commit 1837035

Please sign in to comment.