Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core: Stop removing AuctionRequest.video.plcmt during OpenRTB downgrade #3092

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,7 @@ private static Video modifyVideo(Video video) {
video.getPodseq(),
video.getRqddurs(),
video.getSlotinpod(),
video.getMincpmpersec(),
video.getPlcmt())
video.getMincpmpersec())

? video.toBuilder()
.maxseq(null)
Expand All @@ -166,7 +165,6 @@ private static Video modifyVideo(Video video) {
.rqddurs(null)
.slotinpod(null)
.mincpmpersec(null)
.plcmt(null)
.build()

: null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -586,8 +586,9 @@ class OrtbConverterSpec extends BaseSpec {
}
}

def "PBS should remove imp[0].video.* when we don't support ortb 2.6"() {
def "PBS should remove imp[0].video.* and keep imp[0].video.plcmt when we don't support ortb 2.6"() {
given: "Default bid request with imp[0].video.*"
def placement = PBSUtils.getRandomEnum(VideoPlcmtSubtype)
def bidRequest = BidRequest.defaultBidRequest.tap {
imp[0].video = Video.defaultVideo.tap {
rqddurs = [PBSUtils.randomNumber]
Expand All @@ -597,24 +598,27 @@ class OrtbConverterSpec extends BaseSpec {
podseq = PBSUtils.randomNumber
mincpmpersec = PBSUtils.randomDecimal
slotinpod = PBSUtils.randomNumber
plcmt = PBSUtils.getRandomEnum(VideoPlcmtSubtype)
plcmt = placement
}
}

when: "Requesting PBS auction with ortb 2.5"
prebidServerServiceWithElderOrtb.sendAuctionRequest(bidRequest)

then: "BidResponse shouldn't contain the imp[0].video.* as on request"
verifyAll(bidder.getBidderRequest(bidRequest.id)) {
then: "Bidder request shouldn't contain the imp[0].video.* as on request"
def bidderRequest = bidder.getBidderRequest(bidRequest.id)
verifyAll(bidderRequest) {
!imp[0].video.rqddurs
!imp[0].video.maxseq
!imp[0].video.poddur
!imp[0].video.podid
!imp[0].video.podseq
!imp[0].video.mincpmpersec
!imp[0].video.slotinpod
!imp[0].video.plcmt
}

and: "Bidder request should contain the imp[0].video.* as on request"
bidderRequest.imp[0].video.plcmt == placement
}

def "PBS shouldn't remove imp[0].video.* when we support ortb 2.6"() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ public void convertShouldRemoveFieldsThatAreNotInOrtb25() {
.rqddurs(singletonList(1))
.slotinpod(1)
.mincpmpersec(BigDecimal.ONE)
.plcmt(1)
.build())
.audio(Audio.builder()
.poddur(1)
Expand Down
Loading