Skip to content

Commit ae32b81

Browse files
committed
Fix tests failing
1 parent 06a5873 commit ae32b81

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

src/main/java/org/prebid/server/auction/BidResponseCreator.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,7 @@ private List<BidderResponseInfo> injectWithTargetingAndBidRanking(
714714
.toList())));
715715

716716
final Set<BidInfo> winningBids = new HashSet<>();
717-
final Map<String, List<BidInfo>> seatToBids = new HashMap<>();
717+
final Map<String, Map<String, List<BidInfo>>> seatToBidderToBids = new HashMap<>();
718718

719719
for (final List<BidInfo> bidInfos : impIdToBidInfos.values()) {
720720
final List<BidInfo> bidsWithRanking = isBidRankingEnabled
@@ -726,15 +726,17 @@ private List<BidderResponseInfo> injectWithTargetingAndBidRanking(
726726
if (!bidsWithRanking.isEmpty()) {
727727
winningBids.add(bidsWithRanking.getFirst());
728728
bidsWithRanking.forEach(bidInfo ->
729-
seatToBids.computeIfAbsent(bidInfo.getSeat(), k -> new ArrayList<>()).add(bidInfo));
729+
seatToBidderToBids.computeIfAbsent(bidInfo.getSeat(), k -> new HashMap<>())
730+
.computeIfAbsent(bidInfo.getBidder(), k -> new ArrayList<>()).add(bidInfo));
730731
}
731732
}
732733

733734
return bidderResponseToReducedBidInfos.keySet().stream()
734735
.map(bidderResponseInfo -> injectBidInfoWithTargeting(
735736
bidderResponseInfo,
736737
bidderToMultiBids,
737-
seatToBids.getOrDefault(bidderResponseInfo.getSeat(), Collections.emptyList()),
738+
seatToBidderToBids.getOrDefault(bidderResponseInfo.getSeat(), Collections.emptyMap())
739+
.getOrDefault(bidderResponseInfo.getBidder(), Collections.emptyList()),
738740
winningBids))
739741
.toList();
740742
}

0 commit comments

Comments
 (0)