From 8da851b86243f27a050cab6bade5f3418cefc36f Mon Sep 17 00:00:00 2001 From: antonbabak Date: Wed, 11 Dec 2024 10:55:32 +0100 Subject: [PATCH 1/3] tmax adjustments for individual adapters --- docs/config-app.md | 1 + .../Ortb2BlockingBidderRequestHookTest.java | 3 +- .../server/auction/ExchangeService.java | 15 ++++++-- .../org/prebid/server/bidder/BidderInfo.java | 8 +++-- .../model/BidderConfigurationProperties.java | 3 ++ .../config/bidder/util/BidderInfoCreator.java | 3 +- .../server/auction/ExchangeServiceTest.java | 35 +++++++++++++++---- .../BidderMediaTypeProcessorTest.java | 3 +- .../MultiFormatMediaTypeProcessorTest.java | 3 +- .../enforcement/CcpaEnforcementTest.java | 6 ++-- .../server/bidder/BidderCatalogTest.java | 24 ++++++++----- .../bidder/HttpBidderRequestEnricherTest.java | 6 ++-- .../info/BidderDetailsHandlerTest.java | 3 +- .../validation/BidderParamValidatorTest.java | 3 +- 14 files changed, 86 insertions(+), 30 deletions(-) diff --git a/docs/config-app.md b/docs/config-app.md index ea275c2f151..c037a74c482 100644 --- a/docs/config-app.md +++ b/docs/config-app.md @@ -153,6 +153,7 @@ There are several typical keys: - `adapters..usersync.type` - usersync type (i.e. redirect, iframe). - `adapters..usersync.support-cors` - flag signals if CORS supported by usersync. - `adapters..debug.allow` - enables debug output in the auction response for the given bidder. Default `true`. +- `adapters..tmax-deduction-ms` - adjusts the tmax sent to the bidder by deducting the provided value (ms). Default `0 ms` - no deduction. In addition, each bidder could have arbitrary aliases configured that will look and act very much the same as the bidder itself. Aliases are configured by adding child configuration object at `adapters..aliases..`, aliases diff --git a/extra/modules/ortb2-blocking/src/test/java/org/prebid/server/hooks/modules/ortb2/blocking/v1/Ortb2BlockingBidderRequestHookTest.java b/extra/modules/ortb2-blocking/src/test/java/org/prebid/server/hooks/modules/ortb2/blocking/v1/Ortb2BlockingBidderRequestHookTest.java index 5c1b7303831..b2182a92f6e 100644 --- a/extra/modules/ortb2-blocking/src/test/java/org/prebid/server/hooks/modules/ortb2/blocking/v1/Ortb2BlockingBidderRequestHookTest.java +++ b/extra/modules/ortb2-blocking/src/test/java/org/prebid/server/hooks/modules/ortb2/blocking/v1/Ortb2BlockingBidderRequestHookTest.java @@ -276,7 +276,8 @@ private static BidderInfo bidderInfo(OrtbVersion ortbVersion) { false, false, null, - Ortb.of(false)); + Ortb.of(false), + 0L); } private static BidRequest emptyRequest() { diff --git a/src/main/java/org/prebid/server/auction/ExchangeService.java b/src/main/java/org/prebid/server/auction/ExchangeService.java index c4b6dfd7a55..29c414c0193 100644 --- a/src/main/java/org/prebid/server/auction/ExchangeService.java +++ b/src/main/java/org/prebid/server/auction/ExchangeService.java @@ -1217,6 +1217,7 @@ private Future requestBids(BidderRequest bidderRequest, final String bidderName = bidderRequest.getBidder(); final String resolvedBidderName = aliases.resolveBidder(bidderName); final Bidder bidder = bidderCatalog.bidderByName(resolvedBidderName); + final long bidderTmaxDeductionMs = bidderCatalog.bidderInfoByName(resolvedBidderName).getTmaxDeductionMs(); final BidRejectionTracker bidRejectionTracker = auctionContext.getBidRejectionTrackers().get(bidderName); final TimeoutContext timeoutContext = auctionContext.getTimeoutContext(); @@ -1225,7 +1226,8 @@ private Future requestBids(BidderRequest bidderRequest, final long bidderRequestStartTime = clock.millis(); return Future.succeededFuture(bidderRequest.getBidRequest()) - .map(bidRequest -> adjustTmax(bidRequest, auctionStartTime, adjustmentFactor, bidderRequestStartTime)) + .map(bidRequest -> adjustTmax( + bidRequest, auctionStartTime, adjustmentFactor, bidderRequestStartTime, bidderTmaxDeductionMs)) .map(bidRequest -> ortbVersionConversionManager.convertFromAuctionSupportedVersion( bidRequest, bidderRequest.getOrtbVersion())) .map(bidderRequest::with) @@ -1240,9 +1242,16 @@ private Future requestBids(BidderRequest bidderRequest, .map(seatBid -> BidderResponse.of(bidderName, seatBid, responseTime(bidderRequestStartTime))); } - private BidRequest adjustTmax(BidRequest bidRequest, long startTime, int adjustmentFactor, long currentTime) { + private BidRequest adjustTmax(BidRequest bidRequest, + long startTime, + int adjustmentFactor, + long currentTime, + long bidderTmaxDeductionMs) { + final long tmax = timeoutResolver.limitToMax(bidRequest.getTmax()); - final long adjustedTmax = timeoutResolver.adjustForBidder(tmax, adjustmentFactor, currentTime - startTime); + final long adjustedTmax = timeoutResolver.adjustForBidder( + tmax, adjustmentFactor, currentTime - startTime - bidderTmaxDeductionMs); + return tmax != adjustedTmax ? bidRequest.toBuilder().tmax(adjustedTmax).build() : bidRequest; diff --git a/src/main/java/org/prebid/server/bidder/BidderInfo.java b/src/main/java/org/prebid/server/bidder/BidderInfo.java index c9659135eb7..1ff8f323701 100644 --- a/src/main/java/org/prebid/server/bidder/BidderInfo.java +++ b/src/main/java/org/prebid/server/bidder/BidderInfo.java @@ -40,6 +40,8 @@ public class BidderInfo { Ortb ortb; + long tmaxDeductionMs; + public static BidderInfo create(boolean enabled, OrtbVersion ortbVersion, boolean debugAllowed, @@ -55,7 +57,8 @@ public static BidderInfo create(boolean enabled, boolean ccpaEnforced, boolean modifyingVastXmlAllowed, CompressionType compressionType, - org.prebid.server.spring.config.bidder.model.Ortb ortb) { + org.prebid.server.spring.config.bidder.model.Ortb ortb, + long tmaxDeductionMs) { return of( enabled, @@ -74,7 +77,8 @@ public static BidderInfo create(boolean enabled, ccpaEnforced, modifyingVastXmlAllowed, compressionType, - Ortb.of(ortb.getMultiFormatSupported())); + Ortb.of(ortb.getMultiFormatSupported()), + tmaxDeductionMs); } private static PlatformInfo platformInfo(List mediaTypes) { diff --git a/src/main/java/org/prebid/server/spring/config/bidder/model/BidderConfigurationProperties.java b/src/main/java/org/prebid/server/spring/config/bidder/model/BidderConfigurationProperties.java index 0f5fde1d480..2017459bb50 100644 --- a/src/main/java/org/prebid/server/spring/config/bidder/model/BidderConfigurationProperties.java +++ b/src/main/java/org/prebid/server/spring/config/bidder/model/BidderConfigurationProperties.java @@ -51,6 +51,8 @@ public class BidderConfigurationProperties { private Ortb ortb; + private Long tmaxDeductionMs; + private final Class selfClass; public BidderConfigurationProperties() { @@ -72,6 +74,7 @@ private void init() { ortb = ortb != null && ortb.getMultiFormatSupported() != null ? ortb : defaultProperties.getOrtb(); + tmaxDeductionMs = ObjectUtils.defaultIfNull(tmaxDeductionMs, 0L); if (usersync != null && usersync.getEnabled() == null) { usersync.setEnabled(true); diff --git a/src/main/java/org/prebid/server/spring/config/bidder/util/BidderInfoCreator.java b/src/main/java/org/prebid/server/spring/config/bidder/util/BidderInfoCreator.java index cd7553bb34a..8780225ff9f 100644 --- a/src/main/java/org/prebid/server/spring/config/bidder/util/BidderInfoCreator.java +++ b/src/main/java/org/prebid/server/spring/config/bidder/util/BidderInfoCreator.java @@ -32,6 +32,7 @@ public static BidderInfo create(BidderConfigurationProperties configurationPrope configurationProperties.getPbsEnforcesCcpa(), configurationProperties.getModifyingVastXmlAllowed(), configurationProperties.getEndpointCompression(), - configurationProperties.getOrtb()); + configurationProperties.getOrtb(), + configurationProperties.getTmaxDeductionMs()); } } diff --git a/src/test/java/org/prebid/server/auction/ExchangeServiceTest.java b/src/test/java/org/prebid/server/auction/ExchangeServiceTest.java index bfecf6632f9..ea6eec9547a 100644 --- a/src/test/java/org/prebid/server/auction/ExchangeServiceTest.java +++ b/src/test/java/org/prebid/server/auction/ExchangeServiceTest.java @@ -310,7 +310,8 @@ public void setUp() { false, false, CompressionType.NONE, - Ortb.of(false))); + Ortb.of(false), + 0L)); given(privacyEnforcementService.mask(any(), argThat(MapUtils::isNotEmpty), any())) .willAnswer(inv -> @@ -3774,7 +3775,9 @@ public void shouldResponseWithEmptySeatBidIfBidderNotSupportRequestCurrency() { false, false, CompressionType.NONE, - Ortb.of(false))); + Ortb.of(false), + 0L)); + given(bidResponseCreator.create( argThat(argument -> argument.getAuctionParticipations().getFirst() .getBidderResponse() @@ -3837,17 +3840,35 @@ public void shouldConvertBidRequestOpenRTBVersionToConfiguredByBidder() { @Test public void shouldPassAdjustedTimeoutToAdapterAndToBidResponseCreator() { // given - given(timeoutResolver.adjustForBidder(anyLong(), eq(90), anyLong())) - .willReturn(400L); - given(timeoutResolver.adjustForRequest(anyLong(), anyLong())) - .willReturn(450L); + given(bidderCatalog.bidderInfoByName(anyString())).willReturn(BidderInfo.create( + true, + null, + false, + null, + null, + null, + null, + null, + null, + null, + 0, + null, + false, + false, + CompressionType.NONE, + Ortb.of(false), + 100L)); + + given(timeoutResolver.adjustForBidder(anyLong(), eq(90), eq(100L))).willReturn(400L); + given(timeoutResolver.adjustForRequest(anyLong(), eq(200L))).willReturn(450L); final BidRequest bidRequest = givenBidRequest( givenSingleImp(singletonMap("bidderName", 1)), request -> request.source(Source.builder().tid("uniqTid").build())); // when - target.holdAuction(givenRequestContext(bidRequest)); + target.holdAuction(givenRequestContext(bidRequest).toBuilder() + .timeoutContext(TimeoutContext.of(clock.millis() - 200L, timeout, 90)).build()); // then final ArgumentCaptor bidderRequestCaptor = ArgumentCaptor.forClass(BidderRequest.class); diff --git a/src/test/java/org/prebid/server/auction/mediatypeprocessor/BidderMediaTypeProcessorTest.java b/src/test/java/org/prebid/server/auction/mediatypeprocessor/BidderMediaTypeProcessorTest.java index 60ff60318e1..16875667fae 100644 --- a/src/test/java/org/prebid/server/auction/mediatypeprocessor/BidderMediaTypeProcessorTest.java +++ b/src/test/java/org/prebid/server/auction/mediatypeprocessor/BidderMediaTypeProcessorTest.java @@ -175,7 +175,8 @@ private static BidderInfo givenBidderInfo(List appMediaTypes, false, false, CompressionType.NONE, - Ortb.of(false)); + Ortb.of(false), + 0L); } private static BidRequest givenBidRequest(UnaryOperator bidRequestCustomizer, diff --git a/src/test/java/org/prebid/server/auction/mediatypeprocessor/MultiFormatMediaTypeProcessorTest.java b/src/test/java/org/prebid/server/auction/mediatypeprocessor/MultiFormatMediaTypeProcessorTest.java index e2394769585..61bf49b8745 100644 --- a/src/test/java/org/prebid/server/auction/mediatypeprocessor/MultiFormatMediaTypeProcessorTest.java +++ b/src/test/java/org/prebid/server/auction/mediatypeprocessor/MultiFormatMediaTypeProcessorTest.java @@ -279,7 +279,8 @@ private static BidderInfo givenBidderInfo(boolean multiFormatSupported) { false, false, CompressionType.NONE, - Ortb.of(multiFormatSupported)); + Ortb.of(multiFormatSupported), + 0L); } private static BidRequest givenBidRequest(UnaryOperator bidRequestCustomizer, diff --git a/src/test/java/org/prebid/server/auction/privacy/enforcement/CcpaEnforcementTest.java b/src/test/java/org/prebid/server/auction/privacy/enforcement/CcpaEnforcementTest.java index 9bf76d427f9..178e48ff97d 100644 --- a/src/test/java/org/prebid/server/auction/privacy/enforcement/CcpaEnforcementTest.java +++ b/src/test/java/org/prebid/server/auction/privacy/enforcement/CcpaEnforcementTest.java @@ -79,7 +79,8 @@ public void setUp() { true, false, null, - Ortb.of(false))); + Ortb.of(false), + 0L)); target = new CcpaEnforcement(userFpdCcpaMask, bidderCatalog, metrics, true); @@ -222,7 +223,8 @@ public void enforceShouldSkipNoSaleBiddersAndNotEnforcedByBidderConfig() { false, false, null, - Ortb.of(false))); + Ortb.of(false), + 0L)); final AuctionContext auctionContext = givenAuctionContext(identity()); diff --git a/src/test/java/org/prebid/server/bidder/BidderCatalogTest.java b/src/test/java/org/prebid/server/bidder/BidderCatalogTest.java index f2e0207fc4a..44a3253c143 100644 --- a/src/test/java/org/prebid/server/bidder/BidderCatalogTest.java +++ b/src/test/java/org/prebid/server/bidder/BidderCatalogTest.java @@ -99,7 +99,8 @@ public void metaInfoByNameShouldReturnMetaInfoForKnownBidderIgnoringCase() { true, false, CompressionType.NONE, - Ortb.of(false)); + Ortb.of(false), + 0L); final BidderDeps bidderDeps = BidderDeps.of(singletonList(BidderInstanceDeps.builder() .name("BIDder") @@ -132,7 +133,8 @@ public void isAliasShouldReturnTrueForAliasIgnoringCase() { true, false, CompressionType.NONE, - Ortb.of(false)); + Ortb.of(false), + 0L); final BidderInstanceDeps bidderInstanceDeps = BidderInstanceDeps.builder() .name("BIDder") @@ -156,7 +158,8 @@ public void isAliasShouldReturnTrueForAliasIgnoringCase() { true, false, CompressionType.NONE, - Ortb.of(false)); + Ortb.of(false), + 0L); final BidderInstanceDeps aliasInstanceDeps = BidderInstanceDeps.builder() .name("ALIas") @@ -193,7 +196,8 @@ public void resolveBaseBidderShouldReturnBaseBidderName() { true, false, CompressionType.NONE, - Ortb.of(false))) + Ortb.of(false), + 0L)) .deprecatedNames(emptyList()) .build())); target = new BidderCatalog(singletonList(bidderDeps)); @@ -260,7 +264,8 @@ public void usersyncReadyBiddersShouldReturnBiddersThatCanSync() { true, false, CompressionType.NONE, - Ortb.of(false)); + Ortb.of(false), + 0L); final BidderInfo infoOfBidderWithoutUsersyncConfig = BidderInfo.create( true, @@ -278,7 +283,8 @@ public void usersyncReadyBiddersShouldReturnBiddersThatCanSync() { true, false, CompressionType.NONE, - Ortb.of(false)); + Ortb.of(false), + 0L); final BidderInfo infoOfDisabledBidderWithUsersyncConfig = BidderInfo.create( false, @@ -296,7 +302,8 @@ public void usersyncReadyBiddersShouldReturnBiddersThatCanSync() { true, false, CompressionType.NONE, - Ortb.of(false)); + Ortb.of(false), + 0L); final List bidderDeps = List.of( BidderDeps.of(singletonList(BidderInstanceDeps.builder() @@ -365,7 +372,8 @@ public void nameByVendorIdShouldReturnBidderNameForVendorId() { true, false, CompressionType.NONE, - Ortb.of(false)); + Ortb.of(false), + 0L); final BidderDeps bidderDeps = BidderDeps.of(singletonList(BidderInstanceDeps.builder() .name("BIDder") diff --git a/src/test/java/org/prebid/server/bidder/HttpBidderRequestEnricherTest.java b/src/test/java/org/prebid/server/bidder/HttpBidderRequestEnricherTest.java index 38cad500e7b..4773319266a 100644 --- a/src/test/java/org/prebid/server/bidder/HttpBidderRequestEnricherTest.java +++ b/src/test/java/org/prebid/server/bidder/HttpBidderRequestEnricherTest.java @@ -174,7 +174,8 @@ public void shouldAddContentEncodingHeaderIfRequiredByBidderConfig() { false, false, CompressionType.GZIP, - Ortb.of(false))); + Ortb.of(false), + 0L)); final CaseInsensitiveMultiMap originalHeaders = CaseInsensitiveMultiMap.builder().build(); @@ -212,7 +213,8 @@ public void shouldAddContentEncodingHeaderIfRequiredByBidderAliasConfig() { false, false, CompressionType.GZIP, - Ortb.of(false))); + Ortb.of(false), + 0L)); final CaseInsensitiveMultiMap originalHeaders = CaseInsensitiveMultiMap.builder().build(); diff --git a/src/test/java/org/prebid/server/handler/info/BidderDetailsHandlerTest.java b/src/test/java/org/prebid/server/handler/info/BidderDetailsHandlerTest.java index d8589113f31..36bd669610f 100644 --- a/src/test/java/org/prebid/server/handler/info/BidderDetailsHandlerTest.java +++ b/src/test/java/org/prebid/server/handler/info/BidderDetailsHandlerTest.java @@ -199,7 +199,8 @@ private static BidderInfo givenBidderInfo(boolean enabled, String endpoint, Stri true, false, CompressionType.NONE, - Ortb.of(false)); + Ortb.of(false), + 0L); } private static BidderInfo givenBidderInfo() { diff --git a/src/test/java/org/prebid/server/validation/BidderParamValidatorTest.java b/src/test/java/org/prebid/server/validation/BidderParamValidatorTest.java index a14c6141355..674c4026a72 100644 --- a/src/test/java/org/prebid/server/validation/BidderParamValidatorTest.java +++ b/src/test/java/org/prebid/server/validation/BidderParamValidatorTest.java @@ -398,7 +398,8 @@ private static BidderInfo givenBidderInfo(String aliasOf) { true, false, CompressionType.NONE, - Ortb.of(false)); + Ortb.of(false), + 0L); } private static BidderInfo givenBidderInfo() { From a8d0d9c02e08539880c9cf2f0f33e5599a333cf8 Mon Sep 17 00:00:00 2001 From: antonbabak Date: Mon, 16 Dec 2024 10:33:32 +0100 Subject: [PATCH 2/3] Fix comments --- .../config/bidder/model/BidderConfigurationProperties.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/org/prebid/server/spring/config/bidder/model/BidderConfigurationProperties.java b/src/main/java/org/prebid/server/spring/config/bidder/model/BidderConfigurationProperties.java index 2017459bb50..a13e1aef3ec 100644 --- a/src/main/java/org/prebid/server/spring/config/bidder/model/BidderConfigurationProperties.java +++ b/src/main/java/org/prebid/server/spring/config/bidder/model/BidderConfigurationProperties.java @@ -51,7 +51,7 @@ public class BidderConfigurationProperties { private Ortb ortb; - private Long tmaxDeductionMs; + private long tmaxDeductionMs; private final Class selfClass; @@ -74,7 +74,6 @@ private void init() { ortb = ortb != null && ortb.getMultiFormatSupported() != null ? ortb : defaultProperties.getOrtb(); - tmaxDeductionMs = ObjectUtils.defaultIfNull(tmaxDeductionMs, 0L); if (usersync != null && usersync.getEnabled() == null) { usersync.setEnabled(true); From 01f134810574e844ec274384901079a979d21526 Mon Sep 17 00:00:00 2001 From: antonbabak Date: Wed, 18 Dec 2024 13:46:24 +0100 Subject: [PATCH 3/3] Fixing the Formula --- .../org/prebid/server/auction/ExchangeService.java | 2 +- .../org/prebid/server/auction/TimeoutResolver.java | 10 +++++----- .../org/prebid/server/auction/ExchangeServiceTest.java | 4 ++-- .../org/prebid/server/auction/TimeoutResolverTest.java | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/java/org/prebid/server/auction/ExchangeService.java b/src/main/java/org/prebid/server/auction/ExchangeService.java index 29c414c0193..40c8ff86bde 100644 --- a/src/main/java/org/prebid/server/auction/ExchangeService.java +++ b/src/main/java/org/prebid/server/auction/ExchangeService.java @@ -1250,7 +1250,7 @@ private BidRequest adjustTmax(BidRequest bidRequest, final long tmax = timeoutResolver.limitToMax(bidRequest.getTmax()); final long adjustedTmax = timeoutResolver.adjustForBidder( - tmax, adjustmentFactor, currentTime - startTime - bidderTmaxDeductionMs); + tmax, adjustmentFactor, currentTime - startTime, bidderTmaxDeductionMs); return tmax != adjustedTmax ? bidRequest.toBuilder().tmax(adjustedTmax).build() diff --git a/src/main/java/org/prebid/server/auction/TimeoutResolver.java b/src/main/java/org/prebid/server/auction/TimeoutResolver.java index 4b9d2411eb1..44ae2984aa1 100644 --- a/src/main/java/org/prebid/server/auction/TimeoutResolver.java +++ b/src/main/java/org/prebid/server/auction/TimeoutResolver.java @@ -32,16 +32,16 @@ public long limitToMax(Long timeout) { : Math.min(timeout, maxTimeout); } - public long adjustForBidder(long timeout, int adjustFactor, long spentTime) { - return adjustWithFactor(timeout, adjustFactor / 100.0, spentTime); + public long adjustForBidder(long timeout, int adjustFactor, long spentTime, long bidderTmaxDeductionMs) { + return adjustWithFactor(timeout, adjustFactor / 100.0, spentTime, bidderTmaxDeductionMs); } public long adjustForRequest(long timeout, long spentTime) { - return adjustWithFactor(timeout, 1.0, spentTime); + return adjustWithFactor(timeout, 1.0, spentTime, 0L); } - private long adjustWithFactor(long timeout, double adjustFactor, long spentTime) { - return limitToMin((long) (timeout * adjustFactor) - spentTime - upstreamResponseTime); + private long adjustWithFactor(long timeout, double adjustFactor, long spentTime, long deductionTime) { + return limitToMin((long) (timeout * adjustFactor) - spentTime - deductionTime - upstreamResponseTime); } private long limitToMin(long timeout) { diff --git a/src/test/java/org/prebid/server/auction/ExchangeServiceTest.java b/src/test/java/org/prebid/server/auction/ExchangeServiceTest.java index ea6eec9547a..41c25ea200e 100644 --- a/src/test/java/org/prebid/server/auction/ExchangeServiceTest.java +++ b/src/test/java/org/prebid/server/auction/ExchangeServiceTest.java @@ -382,7 +382,7 @@ public void setUp() { given(criteriaLogManager.traceResponse(any(), any(), any(), anyBoolean())) .willAnswer(inv -> inv.getArgument(1)); - given(timeoutResolver.adjustForBidder(anyLong(), anyInt(), anyLong())) + given(timeoutResolver.adjustForBidder(anyLong(), anyInt(), anyLong(), anyLong())) .willAnswer(invocation -> invocation.getArgument(0)); given(timeoutResolver.adjustForRequest(anyLong(), anyLong())) @@ -3859,7 +3859,7 @@ public void shouldPassAdjustedTimeoutToAdapterAndToBidResponseCreator() { Ortb.of(false), 100L)); - given(timeoutResolver.adjustForBidder(anyLong(), eq(90), eq(100L))).willReturn(400L); + given(timeoutResolver.adjustForBidder(anyLong(), eq(90), eq(200L), eq(100L))).willReturn(400L); given(timeoutResolver.adjustForRequest(anyLong(), eq(200L))).willReturn(450L); final BidRequest bidRequest = givenBidRequest( diff --git a/src/test/java/org/prebid/server/auction/TimeoutResolverTest.java b/src/test/java/org/prebid/server/auction/TimeoutResolverTest.java index 746b7b8cb4a..d1ebf4d3f0a 100644 --- a/src/test/java/org/prebid/server/auction/TimeoutResolverTest.java +++ b/src/test/java/org/prebid/server/auction/TimeoutResolverTest.java @@ -53,12 +53,12 @@ public void limitToMaxShouldReturnMaxTimeout() { @Test public void adjustForBidderShouldReturnExpectedResult() { - assertThat(timeoutResolver.adjustForBidder(200L, 70, 10L)).isEqualTo(120L); + assertThat(timeoutResolver.adjustForBidder(300L, 70, 10L, 50L)).isEqualTo(140L); } @Test public void adjustForBidderShouldReturnMinTimeout() { - assertThat(timeoutResolver.adjustForBidder(200L, 50, 10L)).isEqualTo(MIN_TIMEOUT); + assertThat(timeoutResolver.adjustForBidder(200L, 50, 10L, 100L)).isEqualTo(MIN_TIMEOUT); } @Test