Skip to content

Conversation

@marki1an
Copy link
Collaborator

@marki1an marki1an commented Oct 16, 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 requested a review from osulzhenko October 16, 2025 13:26
@marki1an marki1an self-assigned this Oct 16, 2025
@marki1an marki1an added the tests Functional or other tests label Oct 16, 2025
then: "Pbs should emit creative_ttl.xml with lowest value"
def metrics = defaultPbsService.sendCollectedMetricsRequest()
def minTllSecond = PBSUtils.getMinValue(requestedTtl, accountTtl)
assert metrics[XML_CREATIVE_TTL_ACCOUNT_METRIC.formatted(accountId)] == minTllSecond
Copy link
Collaborator

Choose a reason for hiding this comment

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

assert metrics[XML_CREATIVE_TTL_ACCOUNT_METRIC.formatted(accountId)] == [requestedTtl, accountTtl].findAll().min()

}
}

static Integer getMinValue(Integer valueOne, Integer valueTwo) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

pls remove it

PBSUtils.getRandomNumber(300, 1500) as Integer | PBSUtils.getRandomNumber(300, 1500) as Integer
PBSUtils.getRandomNumber(300, 1500) as Integer | PBSUtils.getRandomNegativeNumber(-300, -1500) as Integer
PBSUtils.getRandomNegativeNumber(-300, -1500) as Integer | PBSUtils.getRandomNumber(300, 1500) as Integer
PBSUtils.getRandomNegativeNumber(-300, -1500) as Integer | PBSUtils.getRandomNegativeNumber(-300, -1500) as Integer
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is a negative value even legit?

assert exception.responseBody == "Account 'a' is required query parameter and can't be empty"
}

def "PBS shouldn't negative value in tllSecond when account vtrack ttl is #accountTtl and request ttl second is #requestedTtl"() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

PBS shouldn't use negative value

then: "Pbs should emit creative_ttl.xml with lowest value"
def metrics = defaultPbsService.sendCollectedMetricsRequest()
assert metrics[XML_CREATIVE_TTL_ACCOUNT_METRIC.formatted(accountId)]
== [requestedTtl, accountTtl].findAll({ it -> it > 0 }).min()
Copy link
Collaborator

Choose a reason for hiding this comment

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

[requestedTtl, accountTtl].findAll { it > 0 }.min()

then: "Pbs should emit creative_ttl.xml with lowest value"
def metrics = defaultPbsService.sendCollectedMetricsRequest()
assert metrics[XML_CREATIVE_TTL_ACCOUNT_METRIC.formatted(accountId)]
== [requestedTtl, accountTtl].findAll().min()
Copy link
Collaborator

Choose a reason for hiding this comment

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

[requestedTtl, accountTtl].min()

@osulzhenko osulzhenko merged commit ec495e7 into vtrack-account-ttl Oct 20, 2025
1 check passed
@osulzhenko osulzhenko deleted the test/vtrack-account-ttl branch October 20, 2025 14:03
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.

3 participants