Skip to content

Test: bid adjustments matching strategy#3940

Merged
osulzhenko merged 4 commits into
bid-adjustments-rules-matching-strategyfrom
tests/bid-adjustments-matching-strategy
May 28, 2025
Merged

Test: bid adjustments matching strategy#3940
osulzhenko merged 4 commits into
bid-adjustments-rules-matching-strategyfrom
tests/bid-adjustments-matching-strategy

Conversation

@marki1an
Copy link
Copy Markdown
Collaborator

@marki1an marki1an commented Apr 28, 2025

🔧 Type of changes

  • new bid adapter
  • bid adapter update
  • new feature
  • new analytics adapter
  • new module
  • module update
  • bugfix
  • documentation
  • configuration
  • dependency update
  • tech debt (test coverage, refactorings, etc.)

✨ 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

  • verify email contact works
  • NO fully dynamic hostnames
  • geographic host parameters are NOT required
  • direct use of HTTP is prohibited - implement an existing Bidder interface that will do all the job
  • if the ORTB is just forwarded to the endpoint, use the generic adapter - define the new adapter as the alias of the generic adapter
  • cover an adapter configuration with an integration test

🧪 Test plan

How do you know the changes are safe to ship to production?

🏎 Quality check

  • Are your changes following our code style guidelines?
  • Are there any breaking changes in your code?
  • Does your test coverage exceed 90%?
  • Are there any erroneous console logs, debuggers or leftover code in your changes?

@marki1an marki1an added the tests Functional or other tests label Apr 28, 2025
@marki1an marki1an self-assigned this Apr 28, 2025
@marki1an
Copy link
Copy Markdown
Collaborator Author

Corresponding issue prebid/prebid-server#4271

@marki1an marki1an changed the base branch from master to bid-adjustments-rules-matching-strategy April 28, 2025 12:23
…es-matching-strategy' into tests/bid-adjustments-matching-strategy
@osulzhenko osulzhenko self-requested a review May 9, 2025 08:18
Copy link
Copy Markdown
Collaborator

@osulzhenko osulzhenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if:
adapterCode doesn't match at all?
dealId is the same, but the bidder is different?
we have both a generic rule like *|seat|* and a specific one like banner|seat|111?

Comment on lines +13 to +17
Map<String, List<AdjustmentRule>> amx
@JsonProperty("ALIAS")
Map<String, List<AdjustmentRule>> aliasUpperCase
@JsonProperty("AlIaS")
Map<String, List<AdjustmentRule>> aliasCamelCase
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick. Pls group up aliases:

    @JsonProperty('*')
    Map<String, List<AdjustmentRule>> wildcardBidder
    Map<String, List<AdjustmentRule>> generic
    Map<String, List<AdjustmentRule>> alias
    @JsonProperty("ALIAS")
    Map<String, List<AdjustmentRule>> aliasUpperCase
    @JsonProperty("AlIaS")
    Map<String, List<AdjustmentRule>> aliasCamelCase
    Map<String, List<AdjustmentRule>> amx
    

bidAdjustmentFactor << [0.9, 1.1]
}

def "PBS should adjust bid price when bid adjustment bidder and bidder code different"() {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We definitely need to check for bidderCode. Same for the others

assert bidderRequest.cur == [currency]
}

def "PBS should adjust bid price when bid adjustment bidder with different case strategy and bidder code different"() {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this test is similar to the previous one. Can we merge them?

@osulzhenko osulzhenko merged commit a828c32 into bid-adjustments-rules-matching-strategy May 28, 2025
1 check passed
@osulzhenko osulzhenko deleted the tests/bid-adjustments-matching-strategy branch May 28, 2025 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Functional or other tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants