Repository navigation
Conversation
bukrain
left a comment
There was a problem hiding this comment.
There are also another two things that differ between the go and java adapter:
- Go adapter clears the imp.ext
- Go adapter takes frist size from banner.format and puts it into banner.w/h
| httpRequests.add(BidderUtil.defaultRequest( | ||
| modifiedBidRequest, | ||
| getResolvedUrl(publisherIdImps.getKey()), | ||
| mapper | ||
| )); |
There was a problem hiding this comment.
| httpRequests.add(BidderUtil.defaultRequest( | |
| modifiedBidRequest, | |
| getResolvedUrl(publisherIdImps.getKey()), | |
| mapper | |
| )); | |
| httpRequests.add(BidderUtil.defaultRequest( | |
| modifiedBidRequest, | |
| getResolvedUrl(publisherIdImps.getKey()), | |
| mapper)); |
| private static Site modifySite(Site site) { | ||
| return site.toBuilder().publisher(null).build(); | ||
| } | ||
|
|
||
| private static App modifyApp(App app) { | ||
| return app.toBuilder().publisher(null).domain("").build(); | ||
| } |
There was a problem hiding this comment.
[minor]
The go adapter does the opposite
- Site - set null publisher and empty the domain
- App - set only null publisher
Wondering if it's expected here?
| case 0 -> getMediaTypeForImpId(bid.getImpid(), imps); | ||
| case null, default -> throw new PreBidException( | ||
| String.format("Unsupported mtype %d for impression with ID: %s", mType, bid.getImpid())); | ||
| }; |
There was a problem hiding this comment.
If there is no mtype defined in the bidResponse, since it's of a type Integer the default value would be a null, so the bid would be dropped, without trying to infer the bid type from the imp.
Please confirm that it's expected behaviour, since in the go adapter, default value for an empty mtype would be 0.
| @@ -0,0 +1,196 @@ | |||
| package org.prebid.server.bidder.matterfull; | |||
There was a problem hiding this comment.
Please use consistent package naming.
The bidder is under org.prebid.server.bidder.matterfull but the tests use org.prebid.server.bidder.matterfullrtb
| import static org.assertj.core.api.Assertions.tuple; | ||
| import static org.prebid.server.bidder.model.BidderError.badServerResponse; | ||
|
|
||
| @ExtendWith(MockitoExtension.class) |
There was a problem hiding this comment.
Since the tests doesn't seem to mock anything, we can remove this
| @ExtendWith(MockitoExtension.class) |
| } | ||
|
|
||
| @Test | ||
| public void makeBidShouldReturnMediaTypeFromImpWhenBidMTypeEqualsZero() throws JsonProcessingException { |
There was a problem hiding this comment.
[typo]
| public void makeBidShouldReturnMediaTypeFromImpWhenBidMTypeEqualsZero() throws JsonProcessingException { | |
| public void makeBidsShouldReturnMediaTypeFromImpWhenBidMTypeEqualsZero() throws JsonProcessingException { |
| } | ||
|
|
||
| @Test | ||
| public void makeBidShouldReturnErrorWhenBidMTypeEqualsZeroAndImpInvalid() throws JsonProcessingException { |
There was a problem hiding this comment.
[typo]
| public void makeBidShouldReturnErrorWhenBidMTypeEqualsZeroAndImpInvalid() throws JsonProcessingException { | |
| public void makeBidsShouldReturnErrorWhenBidMTypeEqualsZeroAndImpInvalid() throws JsonProcessingException { |
| } | ||
|
|
||
| @Test | ||
| public void makeBidShouldReturnErrorWhenImpIsMultiformatAndMTypeEqualsZero() throws JsonProcessingException { |
There was a problem hiding this comment.
[typo]
| public void makeBidShouldReturnErrorWhenImpIsMultiformatAndMTypeEqualsZero() throws JsonProcessingException { | |
| public void makeBidsShouldReturnErrorWhenImpIsMultiformatAndMTypeEqualsZero() throws JsonProcessingException { |
| } | ||
|
|
||
| @Test | ||
| public void makeBidShouldReturnErrorWhenBidMTypeEqualsZeroAndImpNotFound() throws JsonProcessingException { |
There was a problem hiding this comment.
[typo]
| public void makeBidShouldReturnErrorWhenBidMTypeEqualsZeroAndImpNotFound() throws JsonProcessingException { | |
| public void makeBidsShouldReturnErrorWhenBidMTypeEqualsZeroAndImpNotFound() throws JsonProcessingException { |
| @Test | ||
| public void makeBidsShouldReturnBannerBidSuccessfully() throws JsonProcessingException { | ||
| // given | ||
| final Bid videoBid = givenBid(1); |
There was a problem hiding this comment.
| final Bid videoBid = givenBid(1); | |
| final Bid bannerBid = givenBid(1); |
Fix after review
Fix after review
🔧 Type of changes
✨ What's the context?
What's the context for the changes?
🧠 Rationale behind the change
Why did you choose to make these changes? Were there any trade-offs you had to consider?
🔎 New Bid Adapter Checklist
🧪 Test plan
How do you know the changes are safe to ship to production?
🏎 Quality check