-
Notifications
You must be signed in to change notification settings - Fork 193
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
Test: suppressIBV
in response correction module
#3789
base: master
Are you sure you want to change the base?
Conversation
`ibv response correction`
|
||
RESPONSE_REJECTED_DUE_TO_IN_BANNER_VIDEO(353), | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is a part of response_rejection group, no need of extra space
import static org.prebid.server.functional.model.request.auction.BidRequest.getDefaultBidRequest | ||
import static org.prebid.server.functional.model.request.auction.BidRequest.getDefaultVideoRequest | ||
import static org.prebid.server.functional.model.request.auction.DistributionChannel.APP | ||
import static org.prebid.server.functional.model.request.auction.DistributionChannel.DOOH | ||
import static org.prebid.server.functional.model.request.auction.DistributionChannel.SITE | ||
import static org.prebid.server.functional.model.response.auction.BidRejectionReason.* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wildcard import
@@ -439,7 +443,7 @@ class ResponseCorrectionSpec extends ModuleBaseSpec { | |||
bidder.setResponse(bidRequest.id, bidResponse) | |||
|
|||
and: "Save account with enabled response correction module" | |||
def accountWithResponseCorrectionModule = accountConfigWithResponseCorrectionModule(bidRequest) | |||
def accountWithResponseCorrectionModule = accountConfigWithResponseCorrectionModuleAndAppVideoHtml(bidRequest.getAccountId()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could be:
accountConfigWithResponseCorrectionModuleAndAppVideoHtml(bidRequest.accountId)
same for others
private static Account accountConfigWithResponseCorrectionModule(BidRequest bidRequest, Boolean enabledResponseCorrection = true, Boolean enabledAppVideoHtml = true) { | ||
def modulesConfig = new PbsModulesConfig(pbResponseCorrection: new PbResponseCorrection( | ||
enabled: enabledResponseCorrection, appVideoHtml: new AppVideoHtml(enabled: enabledAppVideoHtml))) | ||
def "PBS shouldn't reject auction with 353 code when enabled response correction is #enabledResponseCorrection and enabled suppress ibv is #enabledSuppressIbv"() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PBS should process request without any errors and warning when response correction is #enabledResponseCorrection and suppress ibv is #enabledSuppressIbv
false | false | ||
} | ||
|
||
def "PBS shouldn't reject auction with 353 code when enabled suppress ibv and bid request with imp media type is #mediaType"() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PBS should process request without any errors and warning when suppress ibv is enabled and bid request with imp media type is #mediaType
mediaType << [VIDEO, NATIVE, AUDIO] | ||
} | ||
|
||
def "PBS shouldn't reject auction with 353 code when enabled suppress ibv and bis response with meta media type is #mediaType"() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PBS should process request without any errors and warning when suppress ibv is enabled and bis response with meta media type is #mediaType
def "PBS shouldn't reject auction with 353 code when enabled response correction is #enabledResponseCorrection and enabled suppress ibv is #enabledSuppressIbv"() { | ||
given: "Default bid request with banner and APP" | ||
def bidRequest = getDefaultBidRequest(APP).tap { | ||
ext.prebid.returnAllBidStatus = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we really need returnAllBidStatus
?
mediaType << [BANNER, NATIVE, AUDIO] | ||
} | ||
|
||
def "PBS shouldn't reject auction with 353 code when requested bidder is excluded"() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PBS should process request without any errors and warning when requested bidder is excluded
[BidderName.GENERIC, BidderName.GENERIC_CAMEL_CASE],] | ||
} | ||
|
||
def "PBS should reject auction with 353 code when enabled suppress ibv and imp with media type Banner and bid response meta media type with Video and excluded bidder are not in case"() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PBS should reject auction with 353 code when suppress IBV is enabled, imp media type is Banner, bid response meta media type is Video, and excluded list lacks request bidder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and are we sure that it only for banner? Not the general mismatch with video bid response meta media type?
private static Account accountConfigWithResponseCorrectionModuleAndAppVideoHtml(String accountId, boolean enabledResponseCorrection = true, boolean enabledAppVideoHtml = true) { | ||
accountConfigWithResponseCorrectionModule(accountId, enabledResponseCorrection, enabledAppVideoHtml, false) | ||
} | ||
|
||
private static Account accountConfigWithResponseCorrectionModuleAndSuppressIbv(String accountId, boolean enabledResponseCorrection = true, boolean enabledSuppressIbv = true) { | ||
accountConfigWithResponseCorrectionModule(accountId, enabledResponseCorrection, false, enabledSuppressIbv) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should set enabledResponseCorrection
to true
by default? It will be in this position for 90% of cases. Also, should we add excludedBidders
as a parameter for accountConfigWithResponseCorrectionModuleAndSuppressIbv
?
update in progress |
ibv response correction
🔧 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