Fix AlvadsBidder bid type determination and request mapping: map bids… #4193
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
… to proper Imps, fix getBidType for video, update test payloads, make lambda variable final
🔧 Type of changes
✨ What's the context?
A new bid adapter AlvadsBidder has been implemented, and the bid type determination (BidType) logic has been corrected to properly distinguish between banner and video Imps. Test payloads were also updated to reflect separate banner and video Imps.
🧠 Rationale behind the change
Previously, the getBidType method always returned banner, even when the Imp was a video. This caused test failures and incorrect bid type mapping. The changes include:
Mapping each Bid to its corresponding AlvaAdsImp using impId.
Returning BidType.video when the Imp has a video object.
Updating test payloads to include separate banner and video Imps.
Ensuring lambda variables are final to comply with Java requirements.
No significant trade-offs were involved; the change is internal logic and test improvements.
🔎 New Bid Adapter Checklist
🧪 Test plan
Bids were tested with both banner and video Imps. The results were verified to ensure:
Banner bids return BidType.banner.
Video bids return BidType.video.
Unit test makeBidsShouldReturnBidderBidsWithFullFields passes successfully.
🏎 Quality check