diff --git a/src/main/java/org/prebid/server/analytics/model/NotificationEvent.java b/src/main/java/org/prebid/server/analytics/model/NotificationEvent.java index ad50bd63ee0..770e877346e 100644 --- a/src/main/java/org/prebid/server/analytics/model/NotificationEvent.java +++ b/src/main/java/org/prebid/server/analytics/model/NotificationEvent.java @@ -17,6 +17,10 @@ public class NotificationEvent { Account account; + String bidder; + + Long timestamp; + HttpContext httpContext; public enum Type { diff --git a/src/main/java/org/prebid/server/auction/BidResponseCreator.java b/src/main/java/org/prebid/server/auction/BidResponseCreator.java index 20414b96fcf..f6bcc109114 100644 --- a/src/main/java/org/prebid/server/auction/BidResponseCreator.java +++ b/src/main/java/org/prebid/server/auction/BidResponseCreator.java @@ -107,8 +107,8 @@ public BidResponseCreator(CacheService cacheService, BidderCatalog bidderCatalog * including processing of winning bids with cache IDs. */ Future create(List bidderResponses, BidRequest bidRequest, - ExtRequestTargeting targeting, BidRequestCacheInfo cacheInfo, Account account, - Timeout timeout, boolean debugEnabled) { + ExtRequestTargeting targeting, BidRequestCacheInfo cacheInfo, + Account account, Timeout timeout, long auctionTimestamp, boolean debugEnabled) { final Future result; @@ -119,7 +119,8 @@ Future create(List bidderResponses, BidRequest bidR .nbr(0) // signal "Unknown Error" .seatbid(Collections.emptyList()) .ext(mapper.mapper().valueToTree(toExtBidResponse(bidderResponses, bidRequest, - CacheServiceResult.empty(), VideoStoredDataResult.empty(), debugEnabled, null))) + CacheServiceResult.empty(), VideoStoredDataResult.empty(), debugEnabled, null, + auctionTimestamp))) .build()); } else { final Set winningBids = newOrEmptySet(targeting); @@ -134,11 +135,12 @@ Future create(List bidderResponses, BidRequest bidR ? winningBids : bidderResponses.stream().flatMap(BidResponseCreator::getBids).collect(Collectors.toSet()); - result = toBidsWithCacheIds(bidderResponses, bidsToCache, bidRequest.getImp(), cacheInfo, account, timeout) + result = toBidsWithCacheIds(bidderResponses, bidsToCache, bidRequest.getImp(), cacheInfo, account, timeout, + auctionTimestamp) .compose(cacheResult -> videoStoredDataResult(bidRequest.getImp(), timeout) .map(videoStoredDataResult -> toBidResponse(bidderResponses, bidRequest, targeting, winningBids, winningBidsByBidder, cacheInfo, cacheResult, videoStoredDataResult, - account, debugEnabled))); + account, auctionTimestamp, debugEnabled))); } return result; @@ -159,7 +161,8 @@ private static boolean isEmptyBidderResponses(List bidderRespons */ private ExtBidResponse toExtBidResponse(List bidderResponses, BidRequest bidRequest, CacheServiceResult cacheResult, VideoStoredDataResult videoStoredDataResult, - boolean debugEnabled, Map> bidErrors) { + boolean debugEnabled, Map> bidErrors, + long auctionTimestamp) { final ExtResponseDebug extResponseDebug = debugEnabled ? ExtResponseDebug.of(toExtHttpCalls(bidderResponses, cacheResult), bidRequest) @@ -168,7 +171,8 @@ private ExtBidResponse toExtBidResponse(List bidderResponses, Bi toExtBidderErrors(bidderResponses, bidRequest, cacheResult, videoStoredDataResult, bidErrors); final Map responseTimeMillis = toResponseTimes(bidderResponses, cacheResult); - return ExtBidResponse.of(extResponseDebug, errors, responseTimeMillis, bidRequest.getTmax(), null); + return ExtBidResponse.of(extResponseDebug, errors, responseTimeMillis, bidRequest.getTmax(), null, + auctionTimestamp); } /** @@ -259,7 +263,7 @@ private static Stream getBids(BidderResponse bidderResponse) { */ private Future toBidsWithCacheIds(List bidderResponses, Set bidsToCache, List imps, BidRequestCacheInfo cacheInfo, - Account account, Timeout timeout) { + Account account, Timeout timeout, Long auctionTimestamp) { final Future result; if (!cacheInfo.isDoCaching()) { @@ -273,32 +277,38 @@ private Future toBidsWithCacheIds(List bidde final boolean shouldCacheVideoBids = cacheInfo.isShouldCacheVideoBids(); final boolean eventsEnabled = Objects.equals(account.getEventsEnabled(), true); - final List videoBidIdsToModify = shouldCacheVideoBids && eventsEnabled - ? getVideoBidIdsToModify(bidderResponses, imps) - : Collections.emptyList(); + final Map> bidderToVideoBidIdsToModify = shouldCacheVideoBids && eventsEnabled + ? getBidderAndVideoBidIdsToModify(bidderResponses, imps) + : Collections.emptyMap(); + final Map> bidderToBidIds = bidderResponses.stream() + .collect(Collectors.toMap(BidderResponse::getBidder, bidderResponse -> getBids(bidderResponse) + .map(Bid::getId) + .collect(Collectors.toList()))); final CacheContext cacheContext = CacheContext.builder() .cacheBidsTtl(cacheInfo.getCacheBidsTtl()) .cacheVideoBidsTtl(cacheInfo.getCacheVideoBidsTtl()) .shouldCacheBids(cacheInfo.isShouldCacheBids()) .shouldCacheVideoBids(shouldCacheVideoBids) - .videoBidIdsToModify(videoBidIdsToModify) + .bidderToVideoBidIdsToModify(bidderToVideoBidIdsToModify) + .bidderToBidIds(bidderToBidIds) .build(); - result = cacheService.cacheBidsOpenrtb(bidsWithNonZeroPrice, imps, cacheContext, account, timeout) + result = cacheService.cacheBidsOpenrtb(bidsWithNonZeroPrice, imps, cacheContext, account, timeout, + auctionTimestamp) .map(cacheResult -> addNotCachedBids(cacheResult, bidsToCache)); } - return result; } - private List getVideoBidIdsToModify(List bidderResponses, List imps) { + private Map> getBidderAndVideoBidIdsToModify(List bidderResponses, + List imps) { return bidderResponses.stream() .filter(bidderResponse -> bidderCatalog.isModifyingVastXmlAllowed(bidderResponse.getBidder())) - .flatMap(BidResponseCreator::getBids) - .filter(bid -> isVideoBid(bid, imps)) - .map(Bid::getId) - .collect(Collectors.toList()); + .collect(Collectors.toMap(BidderResponse::getBidder, bidderResponse -> getBids(bidderResponse) + .filter(bid -> isVideoBid(bid, imps)) + .map(Bid::getId) + .collect(Collectors.toList()))); } private static boolean isVideoBid(Bid bid, List imps) { @@ -500,19 +510,19 @@ private BidResponse toBidResponse( List bidderResponses, BidRequest bidRequest, ExtRequestTargeting targeting, Set winningBids, Set winningBidsByBidder, BidRequestCacheInfo cacheInfo, CacheServiceResult cacheResult, VideoStoredDataResult videoStoredDataResult, Account account, - boolean debugEnabled) { + long auctionTimestamp, boolean debugEnabled) { final Map> bidErrors = new HashMap<>(); final List seatBids = bidderResponses.stream() .filter(bidderResponse -> !bidderResponse.getSeatBid().getBids().isEmpty()) .map(bidderResponse -> toSeatBid(bidderResponse, targeting, bidRequest, winningBids, winningBidsByBidder, cacheInfo, cacheResult.getCacheBids(), videoStoredDataResult, account, - bidErrors)) + bidErrors, auctionTimestamp)) .collect(Collectors.toList()); final ExtBidResponse extBidResponse = toExtBidResponse(bidderResponses, bidRequest, cacheResult, videoStoredDataResult, - debugEnabled, bidErrors); + debugEnabled, bidErrors, auctionTimestamp); return BidResponse.builder() .id(bidRequest.getId()) @@ -566,12 +576,14 @@ private boolean checkEchoVideoAttrs(Imp imp) { private SeatBid toSeatBid(BidderResponse bidderResponse, ExtRequestTargeting targeting, BidRequest bidRequest, Set winningBids, Set winningBidsByBidder, BidRequestCacheInfo cacheInfo, Map cachedBids, VideoStoredDataResult videoStoredDataResult, - Account account, Map> bidErrors) { + Account account, Map> bidErrors, long auctionTimestamp) { + final String bidder = bidderResponse.getBidder(); final List bids = bidderResponse.getSeatBid().getBids().stream() .map(bidderBid -> toBid(bidderBid, bidder, targeting, bidRequest, winningBids, winningBidsByBidder, - cacheInfo, cachedBids, videoStoredDataResult.getImpIdToStoredVideo(), account, bidErrors)) + cacheInfo, cachedBids, videoStoredDataResult.getImpIdToStoredVideo(), account, bidErrors, + auctionTimestamp)) .filter(Objects::nonNull) .collect(Collectors.toList()); @@ -587,8 +599,8 @@ private SeatBid toSeatBid(BidderResponse bidderResponse, ExtRequestTargeting tar */ private Bid toBid(BidderBid bidderBid, String bidder, ExtRequestTargeting targeting, BidRequest bidRequest, Set winningBids, Set winningBidsByBidder, BidRequestCacheInfo cacheInfo, - Map bidsWithCacheIds, Map impIdToStoredVideo, Account account, - Map> bidErrors) { + Map bidsWithCacheIds, Map impIdToStoredVideo, + Account account, Map> bidErrors, long auctionTimestamp) { final Bid bid = bidderBid.getBid(); final BidType bidType = bidderBid.getType(); @@ -625,7 +637,7 @@ private Bid toBid(BidderBid bidderBid, String bidder, ExtRequestTargeting target keywordsCreatorByBidType(targeting, isApp); final boolean isWinningBid = winningBids.contains(bid); final String winUrl = eventsEnabled && bidType != BidType.video - ? HttpUtil.encodeUrl(eventsService.winUrlTargeting(account.getId())) + ? HttpUtil.encodeUrl(eventsService.winUrlTargeting(bidder, account.getId(), auctionTimestamp)) : null; targetingKeywords = keywordsCreatorByBidType.getOrDefault(bidType, keywordsCreator) .makeFor(bid, bidder, isWinningBid, cacheId, videoCacheId, cacheHost, cachePath, winUrl); @@ -639,7 +651,9 @@ private Bid toBid(BidderBid bidderBid, String bidder, ExtRequestTargeting target } final Video storedVideo = impIdToStoredVideo.get(bid.getImpid()); - final Events events = eventsEnabled ? eventsService.createEvent(bid.getId(), account.getId()) : null; + final Events events = eventsEnabled + ? eventsService.createEvent(bid.getId(), bidder, account.getId(), auctionTimestamp) + : null; final ExtBidPrebid prebidExt = ExtBidPrebid.of(bidType, targetingKeywords, cache, storedVideo, events, null); final ExtPrebid bidExt = ExtPrebid.of(prebidExt, bid.getExt()); diff --git a/src/main/java/org/prebid/server/auction/ExchangeService.java b/src/main/java/org/prebid/server/auction/ExchangeService.java index 5853e65ce2b..08008947fbc 100644 --- a/src/main/java/org/prebid/server/auction/ExchangeService.java +++ b/src/main/java/org/prebid/server/auction/ExchangeService.java @@ -144,9 +144,10 @@ public Future holdAuction(AuctionContext context) { final List storedResponse = new ArrayList<>(); final Map aliases = aliases(requestExt); final String publisherId = account.getId(); + final Boolean isGdprEnforced = account.getEnforceGdpr(); final ExtRequestTargeting targeting = targeting(requestExt); final BidRequestCacheInfo cacheInfo = bidRequestCacheInfo(targeting, requestExt); - final Boolean isGdprEnforced = account.getEnforceGdpr(); + final long auctionTimestamp = auctionTimestamp(requestExt); final boolean debugEnabled = isDebugEnabled(bidRequest, requestExt); return storedResponseProcessor.getStoredResponseResult(imps, aliases, timeout) @@ -169,28 +170,20 @@ public Future holdAuction(AuctionContext context) { storedResponseProcessor.mergeWithBidderResponses(bidderResponses, storedResponse, imps)) .compose(bidderResponses -> bidResponseCreator.create(bidderResponses, bidRequest, targeting, cacheInfo, account, timeout, - debugEnabled)) + auctionTimestamp, debugEnabled)) .compose(bidResponse -> bidResponsePostProcessor.postProcess(routingContext, uidsCookie, bidRequest, bidResponse, account)); } - /** - * Populates storedResponse parameter with stored {@link List} and returns {@link List} for which - * request to bidders should be performed. - */ - private List populateStoredResponse(StoredResponseResult storedResponseResult, List storedResponse) { - storedResponse.addAll(storedResponseResult.getStoredResponse()); - return storedResponseResult.getRequiredRequestImps(); - } - /** * Extracts {@link ExtBidRequest} from {@link BidRequest}. */ private ExtBidRequest requestExt(BidRequest bidRequest) { try { return bidRequest.getExt() != null - ? mapper.mapper().treeToValue(bidRequest.getExt(), ExtBidRequest.class) : null; + ? mapper.mapper().treeToValue(bidRequest.getExt(), ExtBidRequest.class) + : null; } catch (JsonProcessingException e) { throw new PreBidException(String.format("Error decoding bidRequest.ext: %s", e.getMessage()), e); } @@ -205,6 +198,64 @@ private static Map aliases(ExtBidRequest requestExt) { return aliases != null ? aliases : Collections.emptyMap(); } + /** + * Extracts {@link ExtRequestTargeting} from {@link ExtBidRequest} model. + */ + private static ExtRequestTargeting targeting(ExtBidRequest requestExt) { + final ExtRequestPrebid prebid = requestExt != null ? requestExt.getPrebid() : null; + return prebid != null ? prebid.getTargeting() : null; + } + + /** + * Creates {@link BidRequestCacheInfo} based on {@link ExtBidRequest} model. + */ + private BidRequestCacheInfo bidRequestCacheInfo(ExtRequestTargeting targeting, ExtBidRequest requestExt) { + final ExtRequestPrebid prebid = requestExt != null ? requestExt.getPrebid() : null; + final ExtRequestPrebidCache cache = prebid != null ? prebid.getCache() : null; + + if (targeting != null && cache != null) { + final boolean shouldCacheBids = cache.getBids() != null; + final boolean shouldCacheVideoBids = cache.getVastxml() != null; + final boolean shouldCacheWinningBidsOnly = targeting.getIncludebidderkeys() + ? false // ext.prebid.targeting.includebidderkeys takes precedence + : ObjectUtils.defaultIfNull(cache.getWinningonly(), false); + + if (shouldCacheBids || shouldCacheVideoBids || shouldCacheWinningBidsOnly) { + final Integer cacheBidsTtl = shouldCacheBids ? cache.getBids().getTtlseconds() : null; + final Integer cacheVideoBidsTtl = shouldCacheVideoBids ? cache.getVastxml().getTtlseconds() : null; + + final boolean returnCreativeBid = shouldCacheBids + ? ObjectUtils.defaultIfNull(cache.getBids().getReturnCreative(), true) + : false; + final boolean returnCreativeVideoBid = shouldCacheVideoBids + ? ObjectUtils.defaultIfNull(cache.getVastxml().getReturnCreative(), true) + : false; + + return BidRequestCacheInfo.builder() + .doCaching(true) + .shouldCacheBids(shouldCacheBids) + .cacheBidsTtl(cacheBidsTtl) + .shouldCacheVideoBids(shouldCacheVideoBids) + .cacheVideoBidsTtl(cacheVideoBidsTtl) + .returnCreativeBids(returnCreativeBid) + .returnCreativeVideoBids(returnCreativeVideoBid) + .shouldCacheWinningBidsOnly(shouldCacheWinningBidsOnly) + .build(); + } + } + + return BidRequestCacheInfo.noCache(); + } + + /** + * Extracts auction timestamp from {@link ExtBidRequest} or get it from {@link Clock} if it is null. + */ + private long auctionTimestamp(ExtBidRequest requestExt) { + final ExtRequestPrebid prebid = requestExt != null ? requestExt.getPrebid() : null; + final Long auctionTimestamp = prebid != null ? prebid.getAuctiontimestamp() : null; + return auctionTimestamp != null ? auctionTimestamp : clock.millis(); + } + /** * Determines debug flag from {@link BidRequest} or {@link ExtBidRequest}. */ @@ -217,19 +268,12 @@ private static boolean isDebugEnabled(BidRequest bidRequest, ExtBidRequest extBi } /** - * Extracts bidAdjustments from {@link ExtBidRequest}. - */ - private static Map bidAdjustments(ExtBidRequest requestExt) { - final ExtRequestPrebid prebid = requestExt != null ? requestExt.getPrebid() : null; - final Map bidAdjustmentFactors = prebid != null ? prebid.getBidadjustmentfactors() : null; - return bidAdjustmentFactors != null ? bidAdjustmentFactors : Collections.emptyMap(); - } - - /** - * Extracts currency rates from {@link ExtRequestTargeting}. + * Populates storedResponse parameter with stored {@link List} and returns {@link List} for which + * request to bidders should be performed. */ - private static Map> currencyRates(ExtRequestTargeting targeting) { - return targeting != null && targeting.getCurrency() != null ? targeting.getCurrency().getRates() : null; + private List populateStoredResponse(StoredResponseResult storedResponseResult, List storedResponse) { + storedResponse.addAll(storedResponseResult.getStoredResponse()); + return storedResponseResult.getRequiredRequestImps(); } /** @@ -453,7 +497,7 @@ private String resolveCookieFamilyName(String bidder) { } /** - * Returns Shuffled List of {@link BidderRequest} + * Returns Shuffled List of {@link BidderRequest}. */ private List getBidderRequests( Map bidderToPrivacyEnforcementResult, BidRequest bidRequest, @@ -698,52 +742,19 @@ private List updateRequestMetric(List bidderReques } /** - * Extracts {@link ExtRequestTargeting} from {@link ExtBidRequest} model. + * Extracts currency rates from {@link ExtRequestTargeting}. */ - private static ExtRequestTargeting targeting(ExtBidRequest requestExt) { - final ExtRequestPrebid prebid = requestExt != null ? requestExt.getPrebid() : null; - return prebid != null ? prebid.getTargeting() : null; + private static Map> currencyRates(ExtRequestTargeting targeting) { + return targeting != null && targeting.getCurrency() != null ? targeting.getCurrency().getRates() : null; } /** - * Creates {@link BidRequestCacheInfo} based on {@link ExtBidRequest} model. + * Extracts bidAdjustments from {@link ExtBidRequest}. */ - private BidRequestCacheInfo bidRequestCacheInfo(ExtRequestTargeting targeting, ExtBidRequest requestExt) { + private static Map bidAdjustments(ExtBidRequest requestExt) { final ExtRequestPrebid prebid = requestExt != null ? requestExt.getPrebid() : null; - final ExtRequestPrebidCache cache = prebid != null ? prebid.getCache() : null; - - if (targeting != null && cache != null) { - final boolean shouldCacheBids = cache.getBids() != null; - final boolean shouldCacheVideoBids = cache.getVastxml() != null; - final boolean shouldCacheWinningBidsOnly = targeting.getIncludebidderkeys() - ? false // ext.prebid.targeting.includebidderkeys takes precedence - : ObjectUtils.defaultIfNull(cache.getWinningonly(), false); - - if (shouldCacheBids || shouldCacheVideoBids || shouldCacheWinningBidsOnly) { - final Integer cacheBidsTtl = shouldCacheBids ? cache.getBids().getTtlseconds() : null; - final Integer cacheVideoBidsTtl = shouldCacheVideoBids ? cache.getVastxml().getTtlseconds() : null; - - final boolean returnCreativeBid = shouldCacheBids - ? ObjectUtils.defaultIfNull(cache.getBids().getReturnCreative(), true) - : false; - final boolean returnCreativeVideoBid = shouldCacheVideoBids - ? ObjectUtils.defaultIfNull(cache.getVastxml().getReturnCreative(), true) - : false; - - return BidRequestCacheInfo.builder() - .doCaching(true) - .shouldCacheBids(shouldCacheBids) - .cacheBidsTtl(cacheBidsTtl) - .shouldCacheVideoBids(shouldCacheVideoBids) - .cacheVideoBidsTtl(cacheVideoBidsTtl) - .returnCreativeBids(returnCreativeBid) - .returnCreativeVideoBids(returnCreativeVideoBid) - .shouldCacheWinningBidsOnly(shouldCacheWinningBidsOnly) - .build(); - } - } - - return BidRequestCacheInfo.noCache(); + final Map bidAdjustmentFactors = prebid != null ? prebid.getBidadjustmentfactors() : null; + return bidAdjustmentFactors != null ? bidAdjustmentFactors : Collections.emptyMap(); } /** diff --git a/src/main/java/org/prebid/server/cache/CacheService.java b/src/main/java/org/prebid/server/cache/CacheService.java index 4f6de324451..18c16acb651 100644 --- a/src/main/java/org/prebid/server/cache/CacheService.java +++ b/src/main/java/org/prebid/server/cache/CacheService.java @@ -184,14 +184,20 @@ private List updatePutObjects(List putObjects, Set final List updatedPutObjects = new ArrayList<>(); for (PutObject putObject : putObjects) { + final PutObject.PutObjectBuilder builder = putObject.toBuilder() + // remove "/vtrack" specific fields + .bidid(null) + .bidder(null) + .timestamp(null); + final JsonNode value = putObject.getValue(); if (biddersAllowingVastUpdate.contains(putObject.getBidder()) && value != null) { - final String updatedVastValue = modifyVastXml(value.asText(), putObject.getBidid(), accountId); - final PutObject updatedPutObject = putObject.toBuilder().value(new TextNode(updatedVastValue)).build(); - updatedPutObjects.add(updatedPutObject); - } else { - updatedPutObjects.add(putObject); + final String updatedVastXml = modifyVastXml(value.asText(), putObject.getBidid(), + putObject.getBidder(), accountId, putObject.getTimestamp()); + builder.value(new TextNode(updatedVastXml)).build(); } + + updatedPutObjects.add(builder.build()); } return updatedPutObjects; } @@ -200,7 +206,8 @@ private List updatePutObjects(List putObjects, Set * Makes cache for OpenRTB {@link com.iab.openrtb.response.Bid}s. */ public Future cacheBidsOpenrtb(List bids, List imps, - CacheContext cacheContext, Account account, Timeout timeout) { + CacheContext cacheContext, Account account, Timeout timeout, + Long timestamp) { final Future result; if (CollectionUtils.isEmpty(bids)) { @@ -224,8 +231,8 @@ public Future cacheBidsOpenrtb(List videoCacheBids = getVideoCacheBids(shouldCacheVideoBids, bids, impIdToTtl, videoImpIds, impWithNoExpExists, cacheContext.getCacheVideoBidsTtl(), account); - result = doCacheOpenrtb(cacheBids, videoCacheBids, cacheContext.getVideoBidIdsToModify(), account.getId(), - timeout); + result = doCacheOpenrtb(cacheBids, videoCacheBids, cacheContext.getBidderToVideoBidIdsToModify(), + cacheContext.getBidderToBidIds(), account.getId(), timeout, timestamp); } return result; @@ -298,12 +305,15 @@ private CacheBid toCacheBid(com.iab.openrtb.response.Bid bid, Map * The returned result will always have the number of elements equals to sum of sizes of bids and video bids. */ - private Future doCacheOpenrtb( - List bids, List videoBids, List videoBidIdsToModify, String accountId, - Timeout timeout) { + private Future doCacheOpenrtb(List bids, List videoBids, + Map> bidderToVideoBidIdsToModify, + Map> biddersToCacheBidIds, + String accountId, Timeout timeout, Long timestamp) { final List putObjects = Stream.concat( - bids.stream().map(cacheBid -> createJsonPutObjectOpenrtb(cacheBid, accountId)), - videoBids.stream().map(cacheBid -> createXmlPutObjectOpenrtb(cacheBid, videoBidIdsToModify, accountId))) + bids.stream().map(cacheBid -> createJsonPutObjectOpenrtb(cacheBid, biddersToCacheBidIds, accountId, + timestamp)), + videoBids.stream().map(cacheBid -> createXmlPutObjectOpenrtb(cacheBid, bidderToVideoBidIdsToModify, + accountId, timestamp))) .collect(Collectors.toList()); if (putObjects.isEmpty()) { @@ -383,10 +393,17 @@ private static PutObject createPutObjectVideoOnly(Bid bid) { * Makes JSON type {@link PutObject} from {@link com.iab.openrtb.response.Bid}. * Used for OpenRTB auction request. Also, adds win url to result object. */ - private PutObject createJsonPutObjectOpenrtb(CacheBid cacheBid, String accountId) { + private PutObject createJsonPutObjectOpenrtb(CacheBid cacheBid, Map> biddersToCacheBidIds, + String accountId, Long timestamp) { final com.iab.openrtb.response.Bid bid = cacheBid.getBid(); + final String bidId = bid.getId(); final ObjectNode bidObjectNode = mapper.mapper().valueToTree(bid); - bidObjectNode.put("wurl", eventsService.winUrl(bid.getId(), accountId)); + biddersToCacheBidIds.entrySet().stream() + .filter(biddersAndBidIds -> biddersAndBidIds.getValue().contains(bidId)) + .findFirst() + .map(Map.Entry::getKey) + .ifPresent(bidder -> bidObjectNode.put("wurl", eventsService.winUrl(bidId, bidder, accountId, + timestamp))); return PutObject.builder() .type("json") @@ -398,8 +415,9 @@ private PutObject createJsonPutObjectOpenrtb(CacheBid cacheBid, String accountId /** * Makes XML type {@link PutObject} from {@link com.iab.openrtb.response.Bid}. Used for OpenRTB auction request. */ - private PutObject createXmlPutObjectOpenrtb(CacheBid cacheBid, List videoBidIdsToModify, - String accountId) { + private PutObject createXmlPutObjectOpenrtb(CacheBid cacheBid, + Map> bidderToVideoBidIdsToModify, + String accountId, Long timestamp) { final com.iab.openrtb.response.Bid bid = cacheBid.getBid(); String vastXml; if (bid.getAdm() == null) { @@ -413,18 +431,21 @@ private PutObject createXmlPutObjectOpenrtb(CacheBid cacheBid, List vide } final String bidId = bid.getId(); - if (CollectionUtils.isNotEmpty(videoBidIdsToModify) && videoBidIdsToModify.contains(bidId)) { - vastXml = modifyVastXml(vastXml, bidId, accountId); - } + final String modifiedVastXml = bidderToVideoBidIdsToModify.entrySet().stream() + .filter(biddersAndBidIds -> biddersAndBidIds.getValue().contains(bidId)) + .findFirst() + .map(Map.Entry::getKey) + .map(bidder -> modifyVastXml(vastXml, bidId, bidder, accountId, timestamp)) + .orElse(vastXml); return PutObject.builder() .type("xml") - .value(new TextNode(vastXml)) + .value(new TextNode(modifiedVastXml)) .expiry(cacheBid.getTtl()) .build(); } - private String modifyVastXml(String stringValue, String bidId, String accountId) { + private String modifyVastXml(String stringValue, String bidId, String bidder, String accountId, Long timestamp) { final String closeTag = ""; final int closeTagIndex = stringValue.indexOf(closeTag); @@ -433,7 +454,8 @@ private String modifyVastXml(String stringValue, String bidId, String accountId) return stringValue; } - final String impressionUrl = ""; + final String vastUrlTracking = eventsService.vastUrlTracking(bidId, bidder, accountId, timestamp); + final String impressionUrl = ""; final String openTag = ""; // empty impression tag - just insert the link diff --git a/src/main/java/org/prebid/server/cache/model/CacheContext.java b/src/main/java/org/prebid/server/cache/model/CacheContext.java index bc64af9cb12..f26c975c212 100644 --- a/src/main/java/org/prebid/server/cache/model/CacheContext.java +++ b/src/main/java/org/prebid/server/cache/model/CacheContext.java @@ -4,6 +4,7 @@ import lombok.Value; import java.util.List; +import java.util.Map; /** * Holds the state needed to perform caching response bids. @@ -20,5 +21,7 @@ public class CacheContext { Integer cacheVideoBidsTtl; - List videoBidIdsToModify; + Map> bidderToVideoBidIdsToModify; + + Map> bidderToBidIds; } diff --git a/src/main/java/org/prebid/server/cache/proto/request/PutObject.java b/src/main/java/org/prebid/server/cache/proto/request/PutObject.java index 3bfb525e1f7..a68a689687b 100644 --- a/src/main/java/org/prebid/server/cache/proto/request/PutObject.java +++ b/src/main/java/org/prebid/server/cache/proto/request/PutObject.java @@ -14,10 +14,11 @@ public class PutObject { Integer expiry; - String bidid; + Integer ttlseconds; - String bidder; + String bidid; // this is "/vtrack" specific - Integer ttlseconds; -} + String bidder; // this is "/vtrack" specific + Long timestamp; // this is "/vtrack" specific +} diff --git a/src/main/java/org/prebid/server/events/EventRequest.java b/src/main/java/org/prebid/server/events/EventRequest.java index 66da416acc4..cf631b33dbc 100644 --- a/src/main/java/org/prebid/server/events/EventRequest.java +++ b/src/main/java/org/prebid/server/events/EventRequest.java @@ -16,6 +16,10 @@ public class EventRequest { String accountId; + String bidder; + + Long timestamp; + Format format; Analytics analytics; diff --git a/src/main/java/org/prebid/server/events/EventUtil.java b/src/main/java/org/prebid/server/events/EventUtil.java index e154fd0c71d..8fb4f6833a4 100644 --- a/src/main/java/org/prebid/server/events/EventUtil.java +++ b/src/main/java/org/prebid/server/events/EventUtil.java @@ -22,6 +22,9 @@ public class EventUtil { // Optional query string parameters + private static final String BIDDER_PARAMETER = "bidder"; + private static final String TIMESTAMP_PARAMETER = "ts"; + private static final String FORMAT_PARAMETER = "f"; private static final String BLANK_FORMAT = "b"; // default private static final String IMAGE_FORMAT = "i"; @@ -42,14 +45,6 @@ public static void validateType(RoutingContext context) { } } - public static void validateBidId(RoutingContext context) { - final String bidId = context.request().params().get(BID_ID_PARAMETER); - if (StringUtils.isBlank(bidId)) { - throw new IllegalArgumentException(String.format( - "BidId '%s' is required query parameter and can't be empty", BID_ID_PARAMETER)); - } - } - public static void validateAccountId(RoutingContext context) { final String accountId = context.request().params().get(ACCOUNT_ID_PARAMETER); if (StringUtils.isBlank(accountId)) { @@ -58,6 +53,14 @@ public static void validateAccountId(RoutingContext context) { } } + public static void validateBidId(RoutingContext context) { + final String bidId = context.request().params().get(BID_ID_PARAMETER); + if (StringUtils.isBlank(bidId)) { + throw new IllegalArgumentException(String.format( + "BidId '%s' is required query parameter and can't be empty", BID_ID_PARAMETER)); + } + } + public static void validateFormat(RoutingContext context) { final String format = context.request().params().get(FORMAT_PARAMETER); if (StringUtils.isNotEmpty(format) && !format.equals(BLANK_FORMAT) && !format.equals(IMAGE_FORMAT)) { @@ -77,6 +80,18 @@ public static void validateAnalytics(RoutingContext context) { } } + public static void validateTimestamp(RoutingContext context) { + final String timestamp = StringUtils.stripToNull(context.request().params().get(TIMESTAMP_PARAMETER)); + if (timestamp != null) { + try { + Long.parseLong(timestamp); + } catch (NumberFormatException e) { + throw new IllegalArgumentException(String.format( + "Timestamp '%s' query parameter is not valid number: %s", TIMESTAMP_PARAMETER, timestamp)); + } + } + } + public static EventRequest from(RoutingContext context) { final MultiMap queryParams = context.request().params(); @@ -90,10 +105,15 @@ public static EventRequest from(RoutingContext context) { queryParams.get(ANALYTICS_PARAMETER)) ? EventRequest.Analytics.disabled : EventRequest.Analytics.enabled; + final String timestampAsString = StringUtils.stripToNull(queryParams.get(TIMESTAMP_PARAMETER)); + final Long timestamp = timestampAsString != null ? Long.valueOf(timestampAsString) : null; + return EventRequest.builder() .type(type) .bidId(queryParams.get(BID_ID_PARAMETER)) .accountId(queryParams.get(ACCOUNT_ID_PARAMETER)) + .bidder(queryParams.get(BIDDER_PARAMETER)) + .timestamp(timestamp) .format(format) .analytics(analytics) .build(); @@ -105,25 +125,37 @@ static String toUrl(String externalUrl, EventRequest eventRequest) { eventRequest.getBidId(), eventRequest.getAccountId()); - final String formatQueryString; + return urlWithRequiredParameters + optionalParameters(eventRequest); + } + + private static String optionalParameters(EventRequest eventRequest) { + final StringBuilder result = new StringBuilder(); + + // timestamp + if (eventRequest.getTimestamp() != null) { + result.append(nameValueAsQueryString(TIMESTAMP_PARAMETER, eventRequest.getTimestamp().toString())); + } + + // bidder + if (eventRequest.getBidder() != null) { + result.append(nameValueAsQueryString(BIDDER_PARAMETER, eventRequest.getBidder())); + } + + // format if (eventRequest.getFormat() == EventRequest.Format.blank) { - formatQueryString = nameValueAsQueryString(FORMAT_PARAMETER, BLANK_FORMAT); + result.append(nameValueAsQueryString(FORMAT_PARAMETER, BLANK_FORMAT)); } else if (eventRequest.getFormat() == EventRequest.Format.image) { - formatQueryString = nameValueAsQueryString(FORMAT_PARAMETER, IMAGE_FORMAT); - } else { - formatQueryString = StringUtils.EMPTY; // skip parameter + result.append(nameValueAsQueryString(FORMAT_PARAMETER, IMAGE_FORMAT)); } - final String analyticsQueryString; + // analytics if (eventRequest.getAnalytics() == EventRequest.Analytics.enabled) { - analyticsQueryString = nameValueAsQueryString(ANALYTICS_PARAMETER, ENABLED_ANALYTICS); + result.append(nameValueAsQueryString(ANALYTICS_PARAMETER, ENABLED_ANALYTICS)); } else if (eventRequest.getAnalytics() == EventRequest.Analytics.disabled) { - analyticsQueryString = nameValueAsQueryString(ANALYTICS_PARAMETER, DISABLED_ANALYTICS); - } else { - analyticsQueryString = StringUtils.EMPTY; // skip parameter + result.append(nameValueAsQueryString(ANALYTICS_PARAMETER, DISABLED_ANALYTICS)); } - return urlWithRequiredParameters + formatQueryString + analyticsQueryString; + return result.toString(); } private static String nameValueAsQueryString(String name, String value) { diff --git a/src/main/java/org/prebid/server/events/EventsService.java b/src/main/java/org/prebid/server/events/EventsService.java index 45b75172e3d..1f6fbefe388 100644 --- a/src/main/java/org/prebid/server/events/EventsService.java +++ b/src/main/java/org/prebid/server/events/EventsService.java @@ -18,38 +18,42 @@ public EventsService(String externalUrl) { /** * Returns {@link Events} object based on given params. */ - public Events createEvent(String bidId, String accountId) { + public Events createEvent(String bidId, String bidder, String accountId, Long timestamp) { return Events.of( - eventUrl(EventRequest.Type.win, bidId, accountId, EventRequest.Format.image), - eventUrl(EventRequest.Type.imp, bidId, accountId, EventRequest.Format.image)); + eventUrl(EventRequest.Type.win, bidId, bidder, accountId, timestamp, EventRequest.Format.image), + eventUrl(EventRequest.Type.imp, bidId, bidder, accountId, timestamp, EventRequest.Format.image)); } /** * Returns value for "hb_winurl" targeting keyword. */ - public String winUrlTargeting(String accountId) { - return eventUrl(EventRequest.Type.win, BIDID_PLACEHOLDER, accountId, EventRequest.Format.image); + public String winUrlTargeting(String bidder, String accountId, Long timestamp) { + return eventUrl(EventRequest.Type.win, BIDID_PLACEHOLDER, bidder, accountId, timestamp, + EventRequest.Format.image); } /** * Returns url for win tracking. */ - public String winUrl(String bidId, String accountId) { - return eventUrl(EventRequest.Type.win, bidId, accountId, EventRequest.Format.image); + public String winUrl(String bidId, String bidder, String accountId, Long timestamp) { + return eventUrl(EventRequest.Type.win, bidId, bidder, accountId, timestamp, EventRequest.Format.image); } /** * Returns url for VAST tracking. */ - public String vastUrlTracking(String bidId, String accountId) { - return eventUrl(EventRequest.Type.imp, bidId, accountId, EventRequest.Format.blank); + public String vastUrlTracking(String bidId, String bidder, String accountId, Long timestamp) { + return eventUrl(EventRequest.Type.imp, bidId, bidder, accountId, timestamp, EventRequest.Format.blank); } - private String eventUrl(EventRequest.Type type, String bidId, String accountId, EventRequest.Format format) { + private String eventUrl(EventRequest.Type type, String bidId, String bidder, String accountId, Long timestamp, + EventRequest.Format format) { final EventRequest eventRequest = EventRequest.builder() .type(type) .bidId(bidId) .accountId(accountId) + .bidder(bidder) + .timestamp(timestamp) .format(format) .build(); diff --git a/src/main/java/org/prebid/server/handler/NotificationEventHandler.java b/src/main/java/org/prebid/server/handler/NotificationEventHandler.java index 63f7ee7cc9f..335afcd344c 100644 --- a/src/main/java/org/prebid/server/handler/NotificationEventHandler.java +++ b/src/main/java/org/prebid/server/handler/NotificationEventHandler.java @@ -68,6 +68,7 @@ public void handle(RoutingContext context) { try { EventUtil.validateType(context); EventUtil.validateBidId(context); + EventUtil.validateTimestamp(context); EventUtil.validateFormat(context); EventUtil.validateAnalytics(context); } catch (IllegalArgumentException e) { @@ -120,6 +121,8 @@ private void handleEvent(AsyncResult async, EventRequest eventRequest, ? NotificationEvent.Type.win : NotificationEvent.Type.imp) .bidId(eventRequest.getBidId()) .account(account) + .bidder(eventRequest.getBidder()) + .timestamp(eventRequest.getTimestamp()) .httpContext(HttpContext.from(context)) .build(); analyticsReporter.processEvent(notificationEvent); diff --git a/src/main/java/org/prebid/server/handler/VtrackHandler.java b/src/main/java/org/prebid/server/handler/VtrackHandler.java index 0c594d3e462..4ea4bb1002c 100644 --- a/src/main/java/org/prebid/server/handler/VtrackHandler.java +++ b/src/main/java/org/prebid/server/handler/VtrackHandler.java @@ -72,8 +72,8 @@ public void handle(RoutingContext context) { respondWithBadRequest(context, e.getMessage()); return; } - final Timeout timeout = timeoutFactory.create(defaultTimeout); + applicationSettings.getAccountById(accountId, timeout) .recover(exception -> handleAccountExceptionOrFallback(exception, accountId)) .setHandler(async -> handleAccountResult(async, context, vtrackPuts, accountId, timeout)); @@ -132,7 +132,6 @@ private void handleAccountResult(AsyncResult asyncAccount, RoutingConte final Set biddersAllowingVastUpdate = Objects.equals(asyncAccount.result().getEventsEnabled(), true) ? biddersAllowingVastUpdate(vtrackPuts) : Collections.emptySet(); - cacheService.cachePutObjects(vtrackPuts, biddersAllowingVastUpdate, accountId, timeout) .setHandler(asyncCache -> handleCacheResult(asyncCache, context)); } diff --git a/src/main/java/org/prebid/server/proto/openrtb/ext/request/ExtRequestPrebid.java b/src/main/java/org/prebid/server/proto/openrtb/ext/request/ExtRequestPrebid.java index 920d6b4bc0a..6bf72465966 100644 --- a/src/main/java/org/prebid/server/proto/openrtb/ext/request/ExtRequestPrebid.java +++ b/src/main/java/org/prebid/server/proto/openrtb/ext/request/ExtRequestPrebid.java @@ -55,6 +55,11 @@ public class ExtRequestPrebid { */ List schains; + /** + * Defines the contract for bidrequest.ext.prebid.auctiontimestamp + */ + Long auctiontimestamp; + /** * Defines the contract for bidrequest.ext.prebid.bidders */ diff --git a/src/main/java/org/prebid/server/proto/openrtb/ext/response/ExtBidResponse.java b/src/main/java/org/prebid/server/proto/openrtb/ext/response/ExtBidResponse.java index 46168a89f0c..a15e8476517 100644 --- a/src/main/java/org/prebid/server/proto/openrtb/ext/response/ExtBidResponse.java +++ b/src/main/java/org/prebid/server/proto/openrtb/ext/response/ExtBidResponse.java @@ -37,4 +37,8 @@ public class ExtBidResponse { */ Map usersync; + /** + * Defines the contract for bidresponse.ext.auctiontimestamp + */ + Long auctiontimestamp; } diff --git a/src/test/java/org/prebid/server/auction/BidResponseCreatorTest.java b/src/test/java/org/prebid/server/auction/BidResponseCreatorTest.java index 2997e488ffc..1e8f1fd316d 100644 --- a/src/test/java/org/prebid/server/auction/BidResponseCreatorTest.java +++ b/src/test/java/org/prebid/server/auction/BidResponseCreatorTest.java @@ -65,6 +65,8 @@ import java.time.Instant; import java.time.ZoneId; import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; import java.util.List; import java.util.Map; @@ -79,6 +81,7 @@ import static org.assertj.core.api.Assertions.tuple; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyList; +import static org.mockito.ArgumentMatchers.anyLong; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.argThat; import static org.mockito.ArgumentMatchers.eq; @@ -140,10 +143,10 @@ public void shouldPassOriginalTimeoutToCacheServiceIfCachingIsRequested() { givenCacheServiceResult(singletonMap(bid, CacheIdInfo.of(null, null))); // when - bidResponseCreator.create(bidderResponses, bidRequest, null, cacheInfo, ACCOUNT, timeout, false); + bidResponseCreator.create(bidderResponses, bidRequest, null, cacheInfo, ACCOUNT, timeout, 0L, false); // then - verify(cacheService).cacheBidsOpenrtb(anyList(), anyList(), any(), any(), same(timeout)); + verify(cacheService).cacheBidsOpenrtb(anyList(), anyList(), any(), any(), same(timeout), any()); } @Test @@ -173,14 +176,23 @@ public void shouldRequestCacheServiceWithExpectedArguments() { givenCacheServiceResult(singletonMap(bid1, CacheIdInfo.of(null, null))); // when - bidResponseCreator.create(bidderResponses, bidRequest, null, cacheInfo, ACCOUNT, timeout, false); + bidResponseCreator.create(bidderResponses, bidRequest, null, cacheInfo, ACCOUNT, timeout, 1000L, false); // then + Map> biddersToCacheBidIds = new HashMap(); + biddersToCacheBidIds.put("bidder1", Arrays.asList("bidId1", "bidId2")); + biddersToCacheBidIds.put("bidder2", Arrays.asList("bidId3", "bidId4")); verify(cacheService).cacheBidsOpenrtb( argThat(t -> t.containsAll(asList(bid1, bid4, bid3, bid2))), eq(emptyList()), - eq(CacheContext.builder().shouldCacheBids(true).shouldCacheVideoBids(true).cacheBidsTtl(99) - .cacheVideoBidsTtl(101).videoBidIdsToModify(emptyList()).build()), - eq(Account.builder().id("accountId").build()), eq(timeout)); + eq(CacheContext.builder() + .shouldCacheBids(true) + .shouldCacheVideoBids(true) + .cacheBidsTtl(99) + .cacheVideoBidsTtl(101) + .bidderToVideoBidIdsToModify(emptyMap()) + .bidderToBidIds(biddersToCacheBidIds) + .build()), + eq(Account.builder().id("accountId").build()), eq(timeout), eq(1000L)); } @Test @@ -206,13 +218,19 @@ public void shouldRequestCacheServiceWithWinningBidsOnlyWhenWinningonlyIsTrue() givenCacheServiceResult(singletonMap(bid1, CacheIdInfo.of(null, null))); // when - bidResponseCreator.create(bidderResponses, bidRequest, targeting, cacheInfo, ACCOUNT, timeout, false); + bidResponseCreator.create(bidderResponses, bidRequest, targeting, cacheInfo, ACCOUNT, timeout, 1000L, false); // then + Map> biddersToCacheBidIds = new HashMap(); + biddersToCacheBidIds.put("bidder1", Arrays.asList("bidId1", "bidId2")); + biddersToCacheBidIds.put("bidder2", Arrays.asList("bidId3", "bidId4")); verify(cacheService).cacheBidsOpenrtb( argThat(t -> t.containsAll(asList(bid1, bid2)) && t.size() == 2), eq(emptyList()), - eq(CacheContext.builder().videoBidIdsToModify(emptyList()).build()), - eq(Account.builder().id("accountId").build()), eq(timeout)); + eq(CacheContext.builder() + .bidderToVideoBidIdsToModify(emptyMap()) + .bidderToBidIds(biddersToCacheBidIds) + .build()), + eq(Account.builder().id("accountId").build()), eq(timeout), eq(1000L)); } @Test @@ -240,14 +258,20 @@ public void shouldRequestCacheServiceWithVideoBidsToModifyWhenEventsEnabledAndFo given(bidderCatalog.isModifyingVastXmlAllowed(eq("bidder1"))).willReturn(true); // when - bidResponseCreator.create(bidderResponses, bidRequest, null, cacheInfo, account, timeout, false); + bidResponseCreator.create(bidderResponses, bidRequest, null, cacheInfo, account, timeout, 0L, false); // then + Map> biddersToCacheBidIds = new HashMap(); + biddersToCacheBidIds.put("bidder1", Collections.singletonList("bidId1")); + biddersToCacheBidIds.put("bidder2", Collections.singletonList("bidId2")); verify(cacheService).cacheBidsOpenrtb( argThat(t -> t.containsAll(asList(bid1, bid2))), eq(asList(imp1, imp2)), - eq(CacheContext.builder().shouldCacheVideoBids(true).videoBidIdsToModify(singletonList("bidId1")) + eq(CacheContext.builder() + .shouldCacheVideoBids(true) + .bidderToVideoBidIdsToModify(singletonMap("bidder1", singletonList("bidId1"))) + .bidderToBidIds(biddersToCacheBidIds) .build()), - same(account), eq(timeout)); + same(account), eq(timeout), eq(0L)); } @Test @@ -264,13 +288,16 @@ public void shouldCallCacheServiceEvenRoundedCpmIsZero() { givenCacheServiceResult(singletonMap(bid1, CacheIdInfo.of(null, null))); // when - bidResponseCreator.create(bidderResponses, bidRequest, null, cacheInfo, ACCOUNT, timeout, false); + bidResponseCreator.create(bidderResponses, bidRequest, null, cacheInfo, ACCOUNT, timeout, 0L, false); // then verify(cacheService).cacheBidsOpenrtb( argThat(bids -> bids.contains(bid1)), eq(emptyList()), - eq(CacheContext.builder().videoBidIdsToModify(emptyList()).build()), - eq(Account.builder().id("accountId").build()), eq(timeout)); + eq(CacheContext.builder() + .bidderToVideoBidIdsToModify(emptyMap()) + .bidderToBidIds(singletonMap("bidder1", Collections.singletonList("bidId1"))) + .build()), + eq(Account.builder().id("accountId").build()), eq(timeout), eq(0L)); } @Test @@ -282,20 +309,20 @@ public void shouldSetExpectedConstantResponseFields() { // when final BidResponse bidResponse = bidResponseCreator.create(bidderResponses, bidRequest, - null, null, ACCOUNT, timeout, false).result(); + null, null, ACCOUNT, timeout, 1000L, false).result(); // then final BidResponse responseWithExpectedFields = BidResponse.builder() .id("123") .cur("USD") .ext(mapper.valueToTree( - ExtBidResponse.of(null, null, singletonMap("bidder1", 100), 1000L, null))) + ExtBidResponse.of(null, null, singletonMap("bidder1", 100), 1000L, null, 1000L))) .build(); assertThat(bidResponse) .isEqualToIgnoringGivenFields(responseWithExpectedFields, "nbr", "seatbid"); - verify(cacheService, never()).cacheBidsOpenrtb(anyList(), anyList(), any(), any(), any()); + verify(cacheService, never()).cacheBidsOpenrtb(anyList(), anyList(), any(), any(), any(), any()); } @Test @@ -305,13 +332,13 @@ public void shouldSetNbrValueTwoAndEmptySeatbidWhenIncomingBidResponsesAreEmpty( // when final BidResponse bidResponse = bidResponseCreator.create(emptyList(), bidRequest, null, - null, ACCOUNT, timeout, false).result(); + null, ACCOUNT, timeout, 0L, false).result(); // then assertThat(bidResponse).returns(0, BidResponse::getNbr); assertThat(bidResponse).returns(emptyList(), BidResponse::getSeatbid); - verify(cacheService, never()).cacheBidsOpenrtb(anyList(), anyList(), any(), any(), any()); + verify(cacheService, never()).cacheBidsOpenrtb(anyList(), anyList(), any(), any(), any(), any()); } @Test @@ -323,13 +350,13 @@ public void shouldSetNbrValueTwoAndEmptySeatbidWhenIncomingBidResponsesDoNotCont // when final BidResponse bidResponse = bidResponseCreator.create(bidderResponses, bidRequest, null, - null, ACCOUNT, timeout, false).result(); + null, ACCOUNT, timeout, 1000L, false).result(); // then assertThat(bidResponse).returns(0, BidResponse::getNbr); assertThat(bidResponse).returns(emptyList(), BidResponse::getSeatbid); - verify(cacheService, never()).cacheBidsOpenrtb(anyList(), anyList(), any(), any(), any()); + verify(cacheService, never()).cacheBidsOpenrtb(anyList(), anyList(), any(), any(), any(), any()); } @Test @@ -343,13 +370,13 @@ public void shouldSetNbrNullAndPopulateSeatbidWhenAtLeastOneBidIsPresent() { // when final BidResponse bidResponse = bidResponseCreator.create(bidderResponses, bidRequest, null, - CACHE_INFO, ACCOUNT, timeout, false).result(); + CACHE_INFO, ACCOUNT, timeout, 1000L, false).result(); // then assertThat(bidResponse.getNbr()).isNull(); assertThat(bidResponse.getSeatbid()).hasSize(1); - verify(cacheService, never()).cacheBidsOpenrtb(anyList(), anyList(), any(), any(), any()); + verify(cacheService, never()).cacheBidsOpenrtb(anyList(), anyList(), any(), any(), any(), any()); } @Test @@ -363,12 +390,12 @@ public void shouldSkipBidderResponsesWhereSeatBidContainEmptyBids() { // when final BidResponse bidResponse = bidResponseCreator.create(bidderResponses, bidRequest, - null, CACHE_INFO, ACCOUNT, timeout, false).result(); + null, CACHE_INFO, ACCOUNT, timeout, 1000L, false).result(); // then assertThat(bidResponse.getSeatbid()).hasSize(1); - verify(cacheService, never()).cacheBidsOpenrtb(anyList(), anyList(), any(), any(), any()); + verify(cacheService, never()).cacheBidsOpenrtb(anyList(), anyList(), any(), any(), any(), any()); } @Test @@ -383,7 +410,7 @@ public void shouldSetExpectedResponseSeatBidAndBidFields() { // when final BidResponse bidResponse = bidResponseCreator.create(bidderResponses, bidRequest, - null, CACHE_INFO, ACCOUNT, timeout, false).result(); + null, CACHE_INFO, ACCOUNT, timeout, 1000L, false).result(); // then assertThat(bidResponse.getSeatbid()).containsOnly(SeatBid.builder() @@ -398,7 +425,7 @@ public void shouldSetExpectedResponseSeatBidAndBidFields() { .build())) .build()); - verify(cacheService, never()).cacheBidsOpenrtb(anyList(), anyList(), any(), any(), any()); + verify(cacheService, never()).cacheBidsOpenrtb(anyList(), anyList(), any(), any(), any(), any()); } @Test @@ -438,7 +465,7 @@ public void shouldAddTypeToNativeBidAdm() throws JsonProcessingException { // when final BidResponse bidResponse = bidResponseCreator.create(bidderResponses, bidRequest, - null, CACHE_INFO, ACCOUNT, timeout, false).result(); + null, CACHE_INFO, ACCOUNT, timeout, 1000L, false).result(); // then assertThat(bidResponse.getSeatbid()).hasSize(1) @@ -452,7 +479,7 @@ public void shouldAddTypeToNativeBidAdm() throws JsonProcessingException { .data(com.iab.openrtb.response.DataObject.builder().type(2).build()) .build()); - verify(cacheService, never()).cacheBidsOpenrtb(anyList(), anyList(), any(), any(), any()); + verify(cacheService, never()).cacheBidsOpenrtb(anyList(), anyList(), any(), any(), any(), any()); } @Test @@ -471,7 +498,7 @@ public void shouldSetBidAdmToNullIfCacheIdIsPresentAndReturnCreativeBidsIsFalse( // when final BidResponse bidResponse = bidResponseCreator.create(bidderResponses, bidRequest, - targeting, cacheInfo, ACCOUNT, timeout, false).result(); + targeting, cacheInfo, ACCOUNT, timeout, 0L, false).result(); // then assertThat(bidResponse.getSeatbid()) @@ -479,7 +506,7 @@ public void shouldSetBidAdmToNullIfCacheIdIsPresentAndReturnCreativeBidsIsFalse( .extracting(Bid::getAdm) .containsNull(); - verify(cacheService).cacheBidsOpenrtb(anyList(), anyList(), any(), any(), any()); + verify(cacheService).cacheBidsOpenrtb(anyList(), anyList(), any(), any(), any(), any()); } @Test @@ -498,7 +525,7 @@ public void shouldSetBidAdmToNullIfVideoCacheIdIsPresentAndReturnCreativeVideoBi // when final BidResponse bidResponse = bidResponseCreator.create(bidderResponses, bidRequest, - targeting, cacheInfo, ACCOUNT, timeout, false).result(); + targeting, cacheInfo, ACCOUNT, timeout, 0L, false).result(); // then assertThat(bidResponse.getSeatbid()) @@ -506,7 +533,7 @@ public void shouldSetBidAdmToNullIfVideoCacheIdIsPresentAndReturnCreativeVideoBi .extracting(Bid::getAdm) .containsNull(); - verify(cacheService).cacheBidsOpenrtb(anyList(), anyList(), any(), any(), any()); + verify(cacheService).cacheBidsOpenrtb(anyList(), anyList(), any(), any(), any(), any()); } @Test @@ -520,7 +547,7 @@ public void shouldTolerateMissingExtInSeatBidAndBid() { // when final BidResponse bidResponse = bidResponseCreator.create(bidderResponses, bidRequest, - null, CACHE_INFO, ACCOUNT, timeout, false).result(); + null, CACHE_INFO, ACCOUNT, timeout, 1000L, false).result(); // then assertThat(bidResponse.getSeatbid()).hasSize(1) @@ -532,7 +559,7 @@ public void shouldTolerateMissingExtInSeatBidAndBid() { ExtPrebid.of(ExtBidPrebid.of(banner, null, null, null, null, null), null))) .build()); - verify(cacheService, never()).cacheBidsOpenrtb(anyList(), anyList(), any(), any(), any()); + verify(cacheService, never()).cacheBidsOpenrtb(anyList(), anyList(), any(), any(), any(), any()); } @Test @@ -547,7 +574,7 @@ public void shouldPopulateTargetingKeywords() { // when final BidResponse bidResponse = bidResponseCreator.create(bidderResponses, bidRequest, - targeting, CACHE_INFO, ACCOUNT, timeout, false).result(); + targeting, CACHE_INFO, ACCOUNT, timeout, 1000L, false).result(); // then assertThat(bidResponse.getSeatbid()) @@ -561,7 +588,7 @@ public void shouldPopulateTargetingKeywords() { tuple("hb_bidder", "bidder1"), tuple("hb_bidder_bidder1", "bidder1")); - verify(cacheService, never()).cacheBidsOpenrtb(anyList(), anyList(), any(), any(), any()); + verify(cacheService, never()).cacheBidsOpenrtb(anyList(), anyList(), any(), any(), any(), any()); } @Test @@ -582,7 +609,7 @@ public void shouldPopulateTargetingKeywordsForWinningBidsAndWinningBidsByBidder( // when final BidResponse bidResponse = bidResponseCreator.create(bidderResponses, bidRequest, - targeting, CACHE_INFO, ACCOUNT, timeout, false).result(); + targeting, CACHE_INFO, ACCOUNT, timeout, 0L, false).result(); // then assertThat(bidResponse.getSeatbid()) @@ -597,7 +624,7 @@ public void shouldPopulateTargetingKeywordsForWinningBidsAndWinningBidsByBidder( tuple("bidId2", null, null, null), tuple("bidId3", "bidder2", null, "bidder2")); - verify(cacheService, never()).cacheBidsOpenrtb(anyList(), anyList(), any(), any(), any()); + verify(cacheService, never()).cacheBidsOpenrtb(anyList(), anyList(), any(), any(), any(), any()); } @Test @@ -624,7 +651,7 @@ public void shouldPopulateTargetingKeywordsFromMediaTypePriceGranularities() { // when final BidResponse bidResponse = bidResponseCreator.create(bidderResponses, bidRequest, - targeting, CACHE_INFO, ACCOUNT, timeout, false).result(); + targeting, CACHE_INFO, ACCOUNT, timeout, 0L, false).result(); // then assertThat(bidResponse.getSeatbid()) @@ -638,7 +665,7 @@ public void shouldPopulateTargetingKeywordsFromMediaTypePriceGranularities() { tuple("hb_pb_bidder1", "5.000"), tuple("hb_bidder_bidder1", "bidder1")); - verify(cacheService, never()).cacheBidsOpenrtb(anyList(), anyList(), any(), any(), any()); + verify(cacheService, never()).cacheBidsOpenrtb(anyList(), anyList(), any(), any(), any(), any()); } @Test @@ -656,7 +683,7 @@ public void shouldPopulateCacheIdHostPathAndUuidTargetingKeywords() { // when final BidResponse bidResponse = bidResponseCreator.create(bidderResponses, bidRequest, - targeting, cacheInfo, ACCOUNT, timeout, false).result(); + targeting, cacheInfo, ACCOUNT, timeout, 0L, false).result(); // then assertThat(bidResponse.getSeatbid()) @@ -678,7 +705,7 @@ public void shouldPopulateCacheIdHostPathAndUuidTargetingKeywords() { tuple("hb_cache_host_bidder1", "testHost"), tuple("hb_cache_path_bidder1", "testPath")); - verify(cacheService).cacheBidsOpenrtb(anyList(), anyList(), any(), any(), any()); + verify(cacheService).cacheBidsOpenrtb(anyList(), anyList(), any(), any(), any(), any()); } @Test @@ -693,14 +720,14 @@ public void shouldPopulateTargetingKeywordsWithEventsUrl() { final Account account = Account.builder().id("accountId").eventsEnabled(true).build(); - given(eventsService.winUrlTargeting(anyString())).willReturn("http://win-url"); + given(eventsService.winUrlTargeting(anyString(), anyString(), anyLong())).willReturn("http://win-url"); // when final BidResponse bidResponse = bidResponseCreator.create(bidderResponses, bidRequest, - targeting, CACHE_INFO, account, timeout, false).result(); + targeting, CACHE_INFO, account, timeout, 0L, false).result(); // then - verify(eventsService).winUrlTargeting(eq("accountId")); + verify(eventsService).winUrlTargeting(eq("bidder1"), eq("accountId"), eq(0L)); assertThat(bidResponse.getSeatbid()) .flatExtracting(SeatBid::getBid).hasSize(1) .extracting(responseBid -> toExtPrebid(responseBid.getExt()).getPrebid().getTargeting()) @@ -715,7 +742,7 @@ public void shouldPopulateTargetingKeywordsWithEventsUrl() { tuple("hb_bidid", "bidId1"), tuple("hb_bidid_bidder1", "bidId1")); - verify(cacheService, never()).cacheBidsOpenrtb(anyList(), anyList(), any(), any(), any()); + verify(cacheService, never()).cacheBidsOpenrtb(anyList(), anyList(), any(), any(), any(), any()); } @Test @@ -729,14 +756,14 @@ public void shouldAddExtPrebidEvents() { givenSeatBid(BidderBid.of(bid, banner, "USD")), 100)); final Events events = Events.of("http://event-type-win", "http://event-type-view"); - given(eventsService.createEvent(anyString(), anyString())).willReturn(events); - given(eventsService.winUrlTargeting(anyString())).willReturn("http://win-url"); + given(eventsService.createEvent(anyString(), anyString(), anyString(), anyLong())).willReturn(events); + given(eventsService.winUrlTargeting(anyString(), anyString(), anyLong())).willReturn("http://win-url"); final Account account = Account.builder().id("accountId").eventsEnabled(true).build(); // when final BidResponse bidResponse = bidResponseCreator.create(bidderResponses, bidRequest, - targeting, CACHE_INFO, account, timeout, false).result(); + targeting, CACHE_INFO, account, timeout, 0L, false).result(); // then assertThat(bidResponse.getSeatbid()).hasSize(1) @@ -744,7 +771,7 @@ public void shouldAddExtPrebidEvents() { .extracting(responseBid -> toExtPrebid(responseBid.getExt()).getPrebid().getEvents()) .containsOnly(events); - verify(cacheService, never()).cacheBidsOpenrtb(anyList(), anyList(), any(), any(), any()); + verify(cacheService, never()).cacheBidsOpenrtb(anyList(), anyList(), any(), any(), any(), any()); } @Test @@ -767,7 +794,7 @@ public void shouldReturnCacheEntityInExt() { // when final BidResponse bidResponse = bidResponseCreator.create(bidderResponses, bidRequest, - targeting, cacheInfo, ACCOUNT, timeout, false).result(); + targeting, cacheInfo, ACCOUNT, timeout, 0L, false).result(); // then assertThat(bidResponse.getSeatbid()) @@ -778,7 +805,7 @@ public void shouldReturnCacheEntityInExt() { CacheAsset.of("uuid=cacheId", "cacheId"), CacheAsset.of("uuid=videoId", "videoId"))); - verify(cacheService).cacheBidsOpenrtb(anyList(), anyList(), any(), any(), any()); + verify(cacheService).cacheBidsOpenrtb(anyList(), anyList(), any(), any(), any(), any()); } @Test @@ -807,7 +834,7 @@ public void shouldNotPopulateWinningBidTargetingIfIncludeWinnersFlagIsFalse() { // when final BidResponse bidResponse = bidResponseCreator.create(bidderResponses, bidRequest, - targeting, cacheInfo, ACCOUNT, timeout, false).result(); + targeting, cacheInfo, ACCOUNT, timeout, 0L, false).result(); // then assertThat(bidResponse.getSeatbid()).flatExtracting(SeatBid::getBid) @@ -818,7 +845,7 @@ public void shouldNotPopulateWinningBidTargetingIfIncludeWinnersFlagIsFalse() { .containsOnly( tuple("bidId", null, "bidder1")); - verify(cacheService).cacheBidsOpenrtb(anyList(), anyList(), any(), any(), any()); + verify(cacheService).cacheBidsOpenrtb(anyList(), anyList(), any(), any(), any(), any()); } @Test @@ -847,7 +874,7 @@ public void shouldNotPopulateBidderKeysTargetingIfIncludeBidderKeysFlagIsFalse() // when final BidResponse bidResponse = bidResponseCreator.create(bidderResponses, bidRequest, - targeting, cacheInfo, ACCOUNT, timeout, false).result(); + targeting, cacheInfo, ACCOUNT, timeout, 0L, false).result(); // then assertThat(bidResponse.getSeatbid()).flatExtracting(SeatBid::getBid) @@ -858,7 +885,7 @@ public void shouldNotPopulateBidderKeysTargetingIfIncludeBidderKeysFlagIsFalse() .containsOnly( tuple("bidId", "bidder1", null)); - verify(cacheService).cacheBidsOpenrtb(anyList(), anyList(), any(), any(), any()); + verify(cacheService).cacheBidsOpenrtb(anyList(), anyList(), any(), any(), any(), any()); } @Test @@ -880,7 +907,7 @@ public void shouldNotPopulateCacheIdTargetingKeywordsIfBidCpmIsZero() { // when final BidResponse bidResponse = bidResponseCreator.create(bidderResponses, bidRequest, - targeting, cacheInfo, ACCOUNT, timeout, false).result(); + targeting, cacheInfo, ACCOUNT, timeout, 0L, false).result(); // then assertThat(bidResponse.getSeatbid()).flatExtracting(SeatBid::getBid).hasSize(2) @@ -892,7 +919,7 @@ public void shouldNotPopulateCacheIdTargetingKeywordsIfBidCpmIsZero() { tuple("bidder1", null, null), tuple("bidder2", "cacheId2", "cacheId2")); - verify(cacheService).cacheBidsOpenrtb(anyList(), anyList(), any(), any(), any()); + verify(cacheService).cacheBidsOpenrtb(anyList(), anyList(), any(), any(), any(), any()); } @Test @@ -916,7 +943,7 @@ public void shouldPopulateBidResponseExtension() throws JsonProcessingException // when final BidResponse bidResponse = bidResponseCreator.create(bidderResponses, bidRequest, - null, cacheInfo, ACCOUNT, timeout, false).result(); + null, cacheInfo, ACCOUNT, timeout, 0L, false).result(); // then final ExtBidResponse responseExt = mapper.treeToValue(bidResponse.getExt(), ExtBidResponse.class); @@ -936,7 +963,7 @@ public void shouldPopulateBidResponseExtension() throws JsonProcessingException assertThat(responseExt.getResponsetimemillis()).hasSize(2) .containsOnly(entry("bidder1", 100), entry("cache", 666)); - verify(cacheService).cacheBidsOpenrtb(anyList(), anyList(), any(), any(), any()); + verify(cacheService).cacheBidsOpenrtb(anyList(), anyList(), any(), any(), any(), any()); } @Test @@ -963,7 +990,7 @@ public void impToStoredVideoJsonShouldTolerateWhenStoredVideoFetchIsFailed() { // when final Future result = - bidResponseCreator.create(bidderResponses, bidRequest, null, CACHE_INFO, ACCOUNT, timeout, false); + bidResponseCreator.create(bidderResponses, bidRequest, null, CACHE_INFO, ACCOUNT, timeout, 0L, false); // then verify(storedRequestProcessor).videoStoredDataResult(eq(singletonList(imp)), any(), eq(timeout)); @@ -1014,7 +1041,7 @@ public void impToStoredVideoJsonShouldInjectStoredVideoWhenExtOptionsIsTrueAndVi // when final Future result = - bidResponseCreator.create(bidderResponses, bidRequest, null, CACHE_INFO, ACCOUNT, timeout, false); + bidResponseCreator.create(bidderResponses, bidRequest, null, CACHE_INFO, ACCOUNT, timeout, 0L, false); // then verify(storedRequestProcessor).videoStoredDataResult(eq(Arrays.asList(imp1, imp3)), any(), eq(timeout)); @@ -1049,7 +1076,7 @@ public void impToStoredVideoJsonShouldAddErrorsWithPrebidBidderWhenStoredVideoRe // when final Future result = - bidResponseCreator.create(bidderResponses, bidRequest, null, CACHE_INFO, ACCOUNT, timeout, false); + bidResponseCreator.create(bidderResponses, bidRequest, null, CACHE_INFO, ACCOUNT, timeout, 0L, false); // then verify(storedRequestProcessor).videoStoredDataResult(eq(singletonList(imp1)), any(), eq(timeout)); @@ -1057,7 +1084,7 @@ public void impToStoredVideoJsonShouldAddErrorsWithPrebidBidderWhenStoredVideoRe assertThat(result.result().getExt()).isEqualTo( mapper.valueToTree(ExtBidResponse.of(null, singletonMap( "prebid", singletonList(ExtBidderError.of(BidderError.Type.generic.getCode(), - "Bad timeout"))), singletonMap("bidder1", 100), 1000L, null))); + "Bad timeout"))), singletonMap("bidder1", 100), 1000L, null, 0L))); } @Test @@ -1077,16 +1104,16 @@ public void shouldProcessRequestAndAddErrorAboutDeprecatedBidder() { // when final BidResponse bidResponse = bidResponseCreator.create(bidderResponses, bidRequest, - null, CACHE_INFO, ACCOUNT, timeout, false).result(); + null, CACHE_INFO, ACCOUNT, timeout, 0L, false).result(); // then assertThat(bidResponse.getExt()).isEqualTo( mapper.valueToTree(ExtBidResponse.of(null, singletonMap( invalidBidderName, singletonList(ExtBidderError.of(BidderError.Type.bad_input.getCode(), "invalid has been deprecated and is no longer available. Use valid instead."))), - singletonMap("bidder1", 100), 1000L, null))); + singletonMap("bidder1", 100), 1000L, null, 0L))); - verify(cacheService, never()).cacheBidsOpenrtb(anyList(), anyList(), any(), any(), any()); + verify(cacheService, never()).cacheBidsOpenrtb(anyList(), anyList(), any(), any(), any(), any()); } @Test @@ -1106,7 +1133,7 @@ public void shouldPopulateBidResponseDebugExtensionIfDebugIsEnabled() throws Jso // when final BidResponse bidResponse = bidResponseCreator.create(bidderResponses, bidRequest, - null, cacheInfo, ACCOUNT, timeout, true).result(); + null, cacheInfo, ACCOUNT, timeout, 0L, true).result(); // then final ExtBidResponse responseExt = mapper.treeToValue(bidResponse.getExt(), ExtBidResponse.class); @@ -1119,7 +1146,7 @@ public void shouldPopulateBidResponseDebugExtensionIfDebugIsEnabled() throws Jso assertThat(responseExt.getDebug().getResolvedrequest()).isEqualTo(bidRequest); - verify(cacheService).cacheBidsOpenrtb(anyList(), anyList(), any(), any(), any()); + verify(cacheService).cacheBidsOpenrtb(anyList(), anyList(), any(), any(), any(), anyLong()); } private void givenCacheServiceResult(Map cacheBids) { @@ -1127,7 +1154,7 @@ private void givenCacheServiceResult(Map cacheBids) { } private void givenCacheServiceResult(CacheServiceResult cacheServiceResult) { - given(cacheService.cacheBidsOpenrtb(any(), any(), any(), any(), any())) + given(cacheService.cacheBidsOpenrtb(any(), any(), any(), any(), any(), any())) .willReturn(Future.succeededFuture(cacheServiceResult)); } diff --git a/src/test/java/org/prebid/server/auction/ExchangeServiceTest.java b/src/test/java/org/prebid/server/auction/ExchangeServiceTest.java index 7532d66e885..bd338b10d06 100644 --- a/src/test/java/org/prebid/server/auction/ExchangeServiceTest.java +++ b/src/test/java/org/prebid/server/auction/ExchangeServiceTest.java @@ -99,6 +99,7 @@ import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; import static org.assertj.core.api.Assertions.entry; import static org.mockito.ArgumentMatchers.anyBoolean; +import static org.mockito.ArgumentMatchers.anyLong; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.argThat; import static org.mockito.ArgumentMatchers.eq; @@ -153,7 +154,7 @@ public class ExchangeServiceTest extends VertxTest { @SuppressWarnings("unchecked") @Before public void setUp() { - given(bidResponseCreator.create(anyList(), any(), any(), any(), any(), any(), anyBoolean())) + given(bidResponseCreator.create(anyList(), any(), any(), any(), any(), any(), anyLong(), anyBoolean())) .willReturn(Future.succeededFuture(givenBidResponseWithBids(singletonList(givenBid(identity()))))); given(bidderCatalog.isValidName(anyString())).willReturn(true); @@ -341,6 +342,7 @@ public void shouldPassRequestWithExtPrebidToDefinedBidder() { .putPOJO(bidder1Name, mapper.createObjectNode().put("test1", "test1")) .putPOJO(bidder2Name, mapper.createObjectNode().put("test2", "test2")) .putPOJO("spam", mapper.createObjectNode().put("spam", "spam"))) + .auctiontimestamp(1000L) .build())); final BidRequest bidRequest = givenBidRequest(asList( @@ -395,6 +397,7 @@ public void shouldPassRequestWithInjectedSchainInSourceExt() { final ObjectNode ext = mapper.valueToTree(ExtBidRequest.of( ExtRequestPrebid.builder() .schains(Arrays.asList(schain1, allSchain)) + .auctiontimestamp(1000L) .build())); final BidRequest bidRequest = givenBidRequest(asList( @@ -484,7 +487,9 @@ public void shouldExtractRequestByAliasForCorrectBidder() { final BidRequest bidRequest = givenBidRequest(singletonList( givenImp(singletonMap("bidderAlias", 1), identity())), builder -> builder.ext(mapper.valueToTree(ExtBidRequest.of(ExtRequestPrebid.builder() - .aliases(singletonMap("bidderAlias", "bidder")).build())))); + .aliases(singletonMap("bidderAlias", "bidder")) + .auctiontimestamp(1000L) + .build())))); // when exchangeService.holdAuction(givenRequestContext(bidRequest)); @@ -506,7 +511,7 @@ public void shouldExtractMultipleRequestsForTheSameBidderIfAliasesWereUsed() { final BidRequest bidRequest = givenBidRequest(singletonList( givenImp(doubleMap("bidder", 1, "bidderAlias", 2), identity())), builder -> builder.ext(mapper.valueToTree(ExtBidRequest.of(ExtRequestPrebid.builder() - .aliases(singletonMap("bidderAlias", "bidder")).build())))); + .aliases(singletonMap("bidderAlias", "bidder")).auctiontimestamp(1000L).build())))); // when exchangeService.holdAuction(givenRequestContext(bidRequest)); @@ -543,21 +548,25 @@ public void shouldReturnSeparateSeatBidsForTheSameBidderIfBiddersAliasAndBidderW // given given(httpBidderRequester.requestBids(any(), eq(givenBidRequest(givenSingleImp(singletonMap("bidder", 1)), builder -> builder.ext(mapper.valueToTree(ExtBidRequest.of(ExtRequestPrebid.builder() + .auctiontimestamp(1000L) .aliases(singletonMap("bidderAlias", "bidder")).build()))))), any(), anyBoolean())) .willReturn(Future.succeededFuture(givenSeatBid(singletonList( givenBid(Bid.builder().price(BigDecimal.ONE).build()))))); given(httpBidderRequester.requestBids(any(), eq(givenBidRequest(givenSingleImp(singletonMap("bidder", 2)), builder -> builder.ext(mapper.valueToTree(ExtBidRequest.of(ExtRequestPrebid.builder() + .auctiontimestamp(1000L) .aliases(singletonMap("bidderAlias", "bidder")).build()))))), any(), anyBoolean())) .willReturn(Future.succeededFuture(givenSeatBid(singletonList( givenBid(Bid.builder().price(BigDecimal.ONE).build()))))); final BidRequest bidRequest = givenBidRequest(givenSingleImp(doubleMap("bidder", 1, "bidderAlias", 2)), builder -> builder.ext(mapper.valueToTree(ExtBidRequest.of(ExtRequestPrebid.builder() - .aliases(singletonMap("bidderAlias", "bidder")).build())))); + .aliases(singletonMap("bidderAlias", "bidder")) + .auctiontimestamp(1000L) + .build())))); - given(bidResponseCreator.create(anyList(), any(), any(), any(), any(), any(), anyBoolean())) + given(bidResponseCreator.create(anyList(), any(), any(), any(), any(), any(), anyLong(), anyBoolean())) .willReturn(Future.succeededFuture(BidResponse.builder() .seatbid(asList( givenSeatBid(singletonList(givenBid(identity())), identity()), @@ -590,6 +599,7 @@ public void shouldCallBidResponseCreatorWithExpectedParams() { givenImp(doubleMap("bidder1", 1, "bidder2", 2), builder -> builder.id("impId1"))), builder -> builder.ext(mapper.valueToTree(ExtBidRequest.of(ExtRequestPrebid.builder() .targeting(targeting) + .auctiontimestamp(1000L) .cache(ExtRequestPrebidCache.of(ExtRequestPrebidCacheBids.of(53, true), ExtRequestPrebidCacheVastxml.of(34, true), true)) .build())))); @@ -617,6 +627,7 @@ public void shouldCallBidResponseCreatorWithExpectedParams() { eq(expectedCacheInfo), eq(Account.builder().id("accountId").eventsEnabled(false).build()), eq(timeout), + eq(1000L), eq(false)); assertThat(captor.getValue()).containsOnly( @@ -642,6 +653,7 @@ public void shouldCallBidResponseCreatorWithWinningOnlyTrueWhenIncludeBidderKeys builder -> builder.ext(mapper.valueToTree(ExtBidRequest.of(ExtRequestPrebid.builder() .targeting(targeting) .cache(ExtRequestPrebidCache.of(null, null, true)) + .auctiontimestamp(1000L) .build())))); // when @@ -653,7 +665,7 @@ public void shouldCallBidResponseCreatorWithWinningOnlyTrueWhenIncludeBidderKeys eq(bidRequest), eq(targeting), eq(BidRequestCacheInfo.builder().doCaching(true).shouldCacheWinningBidsOnly(true).build()), - any(), any(), eq(false)); + any(), any(), anyLong(), eq(false)); } @Test @@ -673,6 +685,7 @@ public void shouldCallBidResponseCreatorWithWinningOnlyFalseWhenWinningOnlyIsNul builder -> builder.ext(mapper.valueToTree(ExtBidRequest.of(ExtRequestPrebid.builder() .targeting(targeting) .cache(ExtRequestPrebidCache.of(null, null, null)) + .auctiontimestamp(1000L) .build())))); // when @@ -684,7 +697,7 @@ public void shouldCallBidResponseCreatorWithWinningOnlyFalseWhenWinningOnlyIsNul any(), eq(targeting), eq(BidRequestCacheInfo.builder().build()), - any(), any(), anyBoolean()); + any(), any(), anyLong(), anyBoolean()); } @Test @@ -708,7 +721,7 @@ public void shouldCallBidResponseCreatorWithEnabledDebugTrueIfTestFlagIsTrue() { exchangeService.holdAuction(givenRequestContext(bidRequest)).result(); // then - verify(bidResponseCreator).create(anyList(), eq(bidRequest), any(), any(), any(), any(), eq(true)); + verify(bidResponseCreator).create(anyList(), eq(bidRequest), any(), any(), any(), any(), anyLong(), eq(true)); } @Test @@ -727,13 +740,14 @@ public void shouldCallBidResponseCreatorWithEnabledDebugTrueIfExtPrebidDebugIsOn final BidRequest bidRequest = givenBidRequest( givenSingleImp(singletonMap("bidder1", 1)), builder -> builder.ext( - mapper.valueToTree(ExtBidRequest.of(ExtRequestPrebid.builder().debug(1).build())))); + mapper.valueToTree(ExtBidRequest.of(ExtRequestPrebid.builder().debug(1).auctiontimestamp(1000L) + .build())))); // when exchangeService.holdAuction(givenRequestContext(bidRequest)).result(); // then - verify(bidResponseCreator).create(anyList(), eq(bidRequest), any(), any(), any(), any(), eq(true)); + verify(bidResponseCreator).create(anyList(), eq(bidRequest), any(), any(), any(), any(), anyLong(), eq(true)); } @Test @@ -776,7 +790,8 @@ public void shouldTolerateNullRequestExtPrebidTargeting() { final BidRequest bidRequest = givenBidRequest( givenSingleImp(singletonMap("someBidder", 1)), - builder -> builder.ext(mapper.valueToTree(singletonMap("prebid", singletonMap("someField", 1))))); + builder -> builder.ext(mapper.valueToTree(ExtBidRequest.of(ExtRequestPrebid.builder() + .data(ExtRequestPrebidData.of(singletonList("someBidder"))).auctiontimestamp(1000L).build())))); // when final BidResponse bidResponse = exchangeService.holdAuction(givenRequestContext(bidRequest)).result(); @@ -797,6 +812,7 @@ public void shouldTolerateResponseBidValidationErrors() throws JsonProcessingExc // imp ids are not really used for matching, included them here for clarity givenImp(singletonMap("bidder1", 1), builder -> builder.id("impId1"))), builder -> builder.ext(mapper.valueToTree(ExtBidRequest.of(ExtRequestPrebid.builder() + .auctiontimestamp(1000L) .build())))); given(responseBidValidator.validate(any())) @@ -1039,6 +1055,7 @@ public void shouldCleanRequestExtPrebidDataBidders() { builder -> builder.ext(mapper.valueToTree(ExtBidRequest.of(ExtRequestPrebid.builder() .data(ExtRequestPrebidData.of(asList("someBidder", "should_be_removed"))) .aliases(singletonMap("someBidder", "alias_should_stay")) + .auctiontimestamp(1000L) .build())))); // when @@ -1050,6 +1067,7 @@ public void shouldCleanRequestExtPrebidDataBidders() { ExtBidRequest.of(ExtRequestPrebid.builder() .aliases(singletonMap("someBidder", "alias_should_stay")) .data(ExtRequestPrebidData.of(singletonList("someBidder"))) + .auctiontimestamp(1000L) .build()))); } @@ -1066,6 +1084,7 @@ public void shouldPassUserExtDataOnlyForAllowedBidder() { final BidRequest bidRequest = givenBidRequest(givenSingleImp(bidderToGdpr), builder -> builder .ext(mapper.valueToTree(ExtBidRequest.of(ExtRequestPrebid.builder() + .auctiontimestamp(1000L) .data(ExtRequestPrebidData.of(singletonList("someBidder"))).build()))) .user(User.builder() .ext(mapper.valueToTree(ExtUser.builder().data(dataNode).build())) @@ -1099,6 +1118,7 @@ public void shouldPassSiteExtDataOnlyForAllowedBidder() { final BidRequest bidRequest = givenBidRequest(givenSingleImp(bidderToGdpr), builder -> builder.ext(mapper.valueToTree(ExtBidRequest.of(ExtRequestPrebid.builder() + .auctiontimestamp(1000L) .data(ExtRequestPrebidData.of(singletonList("someBidder"))).build()))) .site(Site.builder().ext(mapper.valueToTree(ExtSite.of(0, dataNode))).build())); @@ -1130,7 +1150,7 @@ public void shouldPassAppExtDataOnlyForAllowedBidder() { final BidRequest bidRequest = givenBidRequest(givenSingleImp(bidderToGdpr), builder -> builder.ext(mapper.valueToTree(ExtBidRequest.of(ExtRequestPrebid.builder() - .data(ExtRequestPrebidData.of(singletonList("someBidder"))).build()))) + .data(ExtRequestPrebidData.of(singletonList("someBidder"))).auctiontimestamp(1000L).build()))) .app(App.builder().ext(mapper.valueToTree(ExtApp.of(null, dataNode))).build())); // when @@ -1223,6 +1243,7 @@ public void shouldPassReducedGlobalTimeoutToConnectorAndOriginalToBidResponseCre builder -> builder.ext(mapper.valueToTree(ExtBidRequest.of(ExtRequestPrebid.builder() .targeting(givenTargeting(true)) .cache(ExtRequestPrebidCache.of(ExtRequestPrebidCacheBids.of(null, null), null, null)) + .auctiontimestamp(1000L) .build())))); // when @@ -1232,7 +1253,8 @@ public void shouldPassReducedGlobalTimeoutToConnectorAndOriginalToBidResponseCre final ArgumentCaptor timeoutCaptor = ArgumentCaptor.forClass(Timeout.class); verify(httpBidderRequester).requestBids(any(), any(), timeoutCaptor.capture(), anyBoolean()); assertThat(timeoutCaptor.getValue().remaining()).isEqualTo(400L); - verify(bidResponseCreator).create(anyList(), any(), any(), any(), any(), same(timeout), anyBoolean()); + verify(bidResponseCreator).create(anyList(), any(), any(), any(), any(), same(timeout), anyLong(), + anyBoolean()); } @Test @@ -1301,7 +1323,8 @@ public void shouldDropBidIfPrebidExceptionWasThrownDuringCurrencyConversion() { // then final ArgumentCaptor> argumentCaptor = ArgumentCaptor.forClass(List.class); - verify(bidResponseCreator).create(argumentCaptor.capture(), any(), any(), any(), any(), any(), anyBoolean()); + verify(bidResponseCreator).create(argumentCaptor.capture(), any(), any(), any(), any(), any(), + anyLong(), anyBoolean()); assertThat(argumentCaptor.getValue()).hasSize(1); @@ -1324,6 +1347,7 @@ public void shouldUpdateBidPriceWithCurrencyConversionAndPriceAdjustmentFactor() builder -> builder.ext(mapper.valueToTree(ExtBidRequest.of(ExtRequestPrebid.builder() .aliases(emptyMap()) .bidadjustmentfactors(singletonMap("bidder", BigDecimal.valueOf(10.0))) + .auctiontimestamp(1000L) .build())))); given(currencyService.convertCurrency(any(), any(), any(), any())).willReturn(BigDecimal.valueOf(10.0)); @@ -1333,7 +1357,8 @@ public void shouldUpdateBidPriceWithCurrencyConversionAndPriceAdjustmentFactor() // then final ArgumentCaptor> argumentCaptor = ArgumentCaptor.forClass(List.class); - verify(bidResponseCreator).create(argumentCaptor.capture(), any(), any(), any(), any(), any(), anyBoolean()); + verify(bidResponseCreator).create(argumentCaptor.capture(), any(), any(), any(), any(), any(), + anyLong(), anyBoolean()); assertThat(argumentCaptor.getValue()).hasSize(1); @@ -1368,7 +1393,8 @@ public void shouldUpdatePriceForOneBidAndDropAnotherIfPrebidExceptionHappensForS // then final ArgumentCaptor> argumentCaptor = ArgumentCaptor.forClass(List.class); - verify(bidResponseCreator).create(argumentCaptor.capture(), any(), any(), any(), any(), any(), anyBoolean()); + verify(bidResponseCreator).create(argumentCaptor.capture(), any(), any(), any(), any(), any(), + anyLong(), anyBoolean()); verify(currencyService).convertCurrency(eq(firstBidderPrice), eq(null), any(), eq("CUR1")); verify(currencyService).convertCurrency(eq(secondBidderPrice), eq(null), any(), eq("CUR2")); @@ -1409,7 +1435,8 @@ public void shouldRespondWithOneBidAndErrorWhenBidResponseContainsOneUnsupported // then final ArgumentCaptor> argumentCaptor = ArgumentCaptor.forClass(List.class); - verify(bidResponseCreator).create(argumentCaptor.capture(), any(), any(), any(), any(), any(), anyBoolean()); + verify(bidResponseCreator).create(argumentCaptor.capture(), any(), any(), any(), any(), any(), + anyLong(), anyBoolean()); verify(currencyService).convertCurrency(eq(firstBidderPrice), eq(null), eq("BAD"), eq("USD")); verify(currencyService).convertCurrency(eq(secondBidderPrice), eq(null), eq("BAD"), eq("CUR")); @@ -1450,7 +1477,8 @@ public void shouldUpdateBidPriceWithCurrencyConversionAndAddErrorAboutMultipleCu // then final ArgumentCaptor> argumentCaptor = ArgumentCaptor.forClass(List.class); - verify(bidResponseCreator).create(argumentCaptor.capture(), any(), any(), any(), any(), any(), anyBoolean()); + verify(bidResponseCreator).create(argumentCaptor.capture(), any(), any(), any(), any(), any(), + anyLong(), anyBoolean()); verify(currencyService).convertCurrency(eq(bidderPrice), eq(null), eq("CUR1"), eq("USD")); assertThat(argumentCaptor.getValue()).hasSize(1); @@ -1495,7 +1523,8 @@ public void shouldUpdateBidPriceWithCurrencyConversionForMultipleBid() { // then final ArgumentCaptor> argumentCaptor = ArgumentCaptor.forClass(List.class); - verify(bidResponseCreator).create(argumentCaptor.capture(), any(), any(), any(), any(), any(), anyBoolean()); + verify(bidResponseCreator).create(argumentCaptor.capture(), any(), any(), any(), any(), any(), + anyLong(), anyBoolean()); verify(currencyService).convertCurrency(eq(bidder1Price), eq(null), eq("USD"), eq("EUR")); verify(currencyService).convertCurrency(eq(bidder2Price), eq(null), eq("USD"), eq("GBP")); verify(currencyService).convertCurrency(eq(bidder3Price), eq(null), eq("USD"), eq("USD")); @@ -1656,6 +1685,7 @@ public void shouldReturnBidsWithAdjustedPricesWhenAdjustmentFactorPresent() { builder -> builder.ext(mapper.valueToTree(ExtBidRequest.of(ExtRequestPrebid.builder() .aliases(emptyMap()) .bidadjustmentfactors(singletonMap("bidder", BigDecimal.valueOf(2.468))) + .auctiontimestamp(1000L) .build())))); givenBidResponseCreator(singletonList(Bid.builder().price(BigDecimal.valueOf(4.936)).build())); @@ -1681,6 +1711,7 @@ public void shouldReturnBidsWithoutAdjustingPricesWhenAdjustmentFactorNotPresent final BidRequest bidRequest = givenBidRequest(singletonList(givenImp(singletonMap("bidder", 2), identity())), builder -> builder.ext(mapper.valueToTree(ExtBidRequest.of(ExtRequestPrebid.builder() .aliases(emptyMap()) + .auctiontimestamp(1000L) .bidadjustmentfactors(singletonMap("some-other-bidder", BigDecimal.TEN)) .build())))); @@ -1806,12 +1837,12 @@ private static ExtRequestTargeting givenTargeting(boolean includebidderkeys) { } private void givenBidResponseCreator(List bids) { - given(bidResponseCreator.create(anyList(), any(), any(), any(), any(), any(), anyBoolean())) + given(bidResponseCreator.create(anyList(), any(), any(), any(), any(), any(), anyLong(), anyBoolean())) .willReturn(Future.succeededFuture(givenBidResponseWithBids(bids))); } private void givenBidResponseCreator(Map> errors) { - given(bidResponseCreator.create(anyList(), any(), any(), any(), any(), any(), anyBoolean())) + given(bidResponseCreator.create(anyList(), any(), any(), any(), any(), any(), anyLong(), anyBoolean())) .willReturn(Future.succeededFuture(givenBidResponseWithError(errors))); } @@ -1825,7 +1856,7 @@ private static BidResponse givenBidResponseWithBids(List bids) { private static BidResponse givenBidResponseWithError(Map> errors) { return BidResponse.builder() .seatbid(emptyList()) - .ext(mapper.valueToTree(ExtBidResponse.of(null, errors, null, null, null))) + .ext(mapper.valueToTree(ExtBidResponse.of(null, errors, null, null, null, null))) .build(); } } diff --git a/src/test/java/org/prebid/server/cache/CacheServiceTest.java b/src/test/java/org/prebid/server/cache/CacheServiceTest.java index a513260ea11..c34ae6b95f2 100644 --- a/src/test/java/org/prebid/server/cache/CacheServiceTest.java +++ b/src/test/java/org/prebid/server/cache/CacheServiceTest.java @@ -45,7 +45,6 @@ import java.time.Instant; import java.time.ZoneId; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import java.util.concurrent.TimeoutException; import java.util.function.Function; @@ -55,6 +54,7 @@ import static java.util.Collections.emptySet; import static java.util.Collections.singleton; import static java.util.Collections.singletonList; +import static java.util.Collections.singletonMap; import static java.util.function.Function.identity; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; @@ -91,6 +91,41 @@ public class CacheServiceTest extends VertxTest { private Account account; + private static List singleBidList() { + return singletonList(givenBid(identity())); + } + + private static Bid givenBid(Function bidCustomizer) { + return bidCustomizer.apply(Bid.builder()).build(); + } + + private static com.iab.openrtb.response.Bid givenBidOpenrtb( + Function bidCustomizer) { + return bidCustomizer.apply(com.iab.openrtb.response.Bid.builder()).build(); + } + + private static Imp givenImp(Function impCustomizer) { + return impCustomizer.apply(Imp.builder()).build(); + } + + private static CacheHttpRequest givenCacheHttpRequest(com.iab.openrtb.response.Bid... bids) + throws JsonProcessingException { + final List putObjects; + if (bids != null) { + putObjects = new ArrayList<>(); + for (com.iab.openrtb.response.Bid bid : bids) { + final ObjectNode bidObjectNode = mapper.valueToTree(bid); + bidObjectNode.put("wurl", "http://win-url"); + putObjects.add(PutObject.builder().type("json").value(bidObjectNode).build()); + } + } else { + putObjects = null; + } + return CacheHttpRequest.of( + "http://cache-service/cache", + mapper.writeValueAsString(BidCacheRequest.of(putObjects))); + } + @Before public void setUp() throws MalformedURLException, JsonProcessingException { clock = Clock.fixed(Instant.now(), ZoneId.systemDefault()); @@ -340,7 +375,7 @@ public void cacheBidsVideoOnlyShouldReturnExpectedResult() { @Test public void cacheBidsOpenrtbShouldNeverCallCacheServiceIfNoBidsPassed() { // when - cacheService.cacheBidsOpenrtb(emptyList(), emptyList(), null, null, null); + cacheService.cacheBidsOpenrtb(emptyList(), emptyList(), null, null, null, 0L); // then verifyZeroInteractions(httpClient); @@ -350,7 +385,11 @@ public void cacheBidsOpenrtbShouldNeverCallCacheServiceIfNoBidsPassed() { public void cacheBidsOpenrtbShouldPerformHttpRequestWithExpectedTimeout() { // when cacheService.cacheBidsOpenrtb(singletonList(givenBidOpenrtb(identity())), singletonList(givenImp(identity())), - CacheContext.builder().shouldCacheBids(true).build(), account, timeout); + CacheContext.builder() + .shouldCacheBids(true) + .bidderToBidIds(singletonMap("bidder", singletonList("bidId1"))) + .build(), + account, timeout, 0L); // then verify(httpClient).post(anyString(), any(), any(), eq(500L)); @@ -361,7 +400,11 @@ public void cacheBidsOpenrtbShouldTolerateGlobalTimeoutAlreadyExpired() { // when final Future future = cacheService.cacheBidsOpenrtb( singletonList(givenBidOpenrtb(identity())), singletonList(givenImp(identity())), - CacheContext.builder().shouldCacheBids(true).build(), account, expiredTimeout); + CacheContext.builder() + .shouldCacheBids(true) + .bidderToBidIds(singletonMap("bidder", singletonList("bidId1"))) + .build(), + account, expiredTimeout, 0L); // then final CacheServiceResult result = future.result(); @@ -379,25 +422,32 @@ public void cacheBidsOpenrtbShouldStoreWinUrl() { // when cacheService.cacheBidsOpenrtb( singletonList(bid), singletonList(givenImp(builder -> builder.id("impId1"))), - CacheContext.builder().shouldCacheBids(true).build(), Account.builder().id("accountId").build(), - timeout); + CacheContext.builder() + .shouldCacheBids(true) + .bidderToBidIds(singletonMap("bidder", singletonList("bidId1"))) + .build(), + Account.builder().id("accountId").build(), timeout, 0L); // then - verify(eventsService).winUrl(eq("bidId1"), eq("accountId")); + verify(eventsService).winUrl(eq("bidId1"), eq("bidder"), eq("accountId"), eq(0L)); } @Test public void cacheBidsOpenrtbShouldTolerateReadingHttpResponseFails() throws JsonProcessingException { // given givenHttpClientProducesException(new RuntimeException("Response exception")); - given(eventsService.winUrl(anyString(), any())).willReturn("http://win-url"); + given(eventsService.winUrl(anyString(), anyString(), any(), any())).willReturn("http://win-url"); final com.iab.openrtb.response.Bid bid = givenBidOpenrtb(builder -> builder.id("bidId1").impid("impId1")); // when final Future future = cacheService.cacheBidsOpenrtb( singletonList(bid), singletonList(givenImp(builder -> builder.id("impId1"))), - CacheContext.builder().shouldCacheBids(true).build(), account, timeout); + CacheContext.builder() + .shouldCacheBids(true) + .bidderToBidIds(singletonMap("bidder", singletonList("bidId1"))) + .build(), + account, timeout, 0L); // then final CacheServiceResult result = future.result(); @@ -411,14 +461,18 @@ public void cacheBidsOpenrtbShouldTolerateReadingHttpResponseFails() throws Json public void cacheBidsOpenrtbShouldTolerateResponseCodeIsNot200() throws JsonProcessingException { // given givenHttpClientReturnsResponse(503, "response"); - given(eventsService.winUrl(anyString(), any())).willReturn("http://win-url"); + given(eventsService.winUrl(anyString(), anyString(), any(), any())).willReturn("http://win-url"); final com.iab.openrtb.response.Bid bid = givenBidOpenrtb(builder -> builder.id("bidId1").impid("impId1")); // when final Future future = cacheService.cacheBidsOpenrtb( singletonList(bid), singletonList(givenImp(builder -> builder.id("impId1"))), - CacheContext.builder().shouldCacheBids(true).build(), account, timeout); + CacheContext.builder() + .shouldCacheBids(true) + .bidderToBidIds(singletonMap("bidder", singletonList("bidId1"))) + .build(), + account, timeout, 0L); // then final CacheServiceResult result = future.result(); @@ -433,14 +487,18 @@ public void cacheBidsOpenrtbShouldTolerateResponseCodeIsNot200() throws JsonProc public void cacheBidsOpenrtbShouldTolerateResponseBodyCouldNotBeParsed() throws JsonProcessingException { // given givenHttpClientReturnsResponse(200, "response"); - given(eventsService.winUrl(anyString(), any())).willReturn("http://win-url"); + given(eventsService.winUrl(anyString(), anyString(), any(), any())).willReturn("http://win-url"); final com.iab.openrtb.response.Bid bid = givenBidOpenrtb(builder -> builder.id("bidId1").impid("impId1")); // when final Future future = cacheService.cacheBidsOpenrtb( singletonList(bid), singletonList(givenImp(builder -> builder.id("impId1"))), - CacheContext.builder().shouldCacheBids(true).build(), account, timeout); + CacheContext.builder() + .shouldCacheBids(true) + .bidderToBidIds(singletonMap("bidder", singletonList("bidId1"))) + .build(), + account, timeout, 0L); // then final CacheServiceResult result = future.result(); @@ -456,14 +514,18 @@ public void cacheBidsOpenrtbShouldTolerateCacheEntriesNumberDoesNotMatchBidsNumb throws JsonProcessingException { // given givenHttpClientReturnsResponse(200, "{}"); - given(eventsService.winUrl(anyString(), any())).willReturn("http://win-url"); + given(eventsService.winUrl(anyString(), anyString(), any(), any())).willReturn("http://win-url"); final com.iab.openrtb.response.Bid bid = givenBidOpenrtb(builder -> builder.id("bidId1").impid("impId1")); // when final Future future = cacheService.cacheBidsOpenrtb( singletonList(bid), singletonList(givenImp(builder -> builder.id("impId1"))), - CacheContext.builder().shouldCacheBids(true).build(), account, timeout); + CacheContext.builder() + .shouldCacheBids(true) + .bidderToBidIds(singletonMap("bidder", singletonList("bidId1"))) + .build(), + account, timeout, 0L); // then final CacheServiceResult result = future.result(); @@ -478,14 +540,18 @@ public void cacheBidsOpenrtbShouldTolerateCacheEntriesNumberDoesNotMatchBidsNumb @Test public void cacheBidsOpenrtbShouldReturnExpectedDebugInfo() throws JsonProcessingException { // given - given(eventsService.winUrl(anyString(), any())).willReturn("http://win-url"); + given(eventsService.winUrl(anyString(), anyString(), any(), any())).willReturn("http://win-url"); final com.iab.openrtb.response.Bid bid = givenBidOpenrtb(builder -> builder.id("bidId1").impid("impId1")); // when final Future future = cacheService.cacheBidsOpenrtb( singletonList(bid), singletonList(givenImp(builder -> builder.id("impId1"))), - CacheContext.builder().shouldCacheBids(true).build(), account, timeout); + CacheContext.builder() + .shouldCacheBids(true) + .bidderToBidIds(singletonMap("bidder", singletonList("bidId1"))) + .build(), + account, timeout, 0L); // then final CacheServiceResult result = future.result(); @@ -502,7 +568,11 @@ public void cacheBidsOpenrtbShouldReturnExpectedCacheBids() { // when final Future future = cacheService.cacheBidsOpenrtb( singletonList(bid), singletonList(givenImp(builder -> builder.id("impId1"))), - CacheContext.builder().shouldCacheBids(true).build(), account, timeout); + CacheContext.builder() + .shouldCacheBids(true) + .bidderToBidIds(singletonMap("bidder", singletonList("bidId1"))) + .build(), + account, timeout, 0L); // then final CacheServiceResult result = future.result(); @@ -513,17 +583,24 @@ public void cacheBidsOpenrtbShouldReturnExpectedCacheBids() { @Test public void cacheBidsOpenrtbShouldPerformHttpRequestWithExpectedBody() throws IOException { // given - given(eventsService.winUrl(any(), any())).willReturn("http://win-url"); + given(eventsService.winUrl(anyString(), anyString(), any(), any())).willReturn("http://win-url"); - final com.iab.openrtb.response.Bid bid1 = givenBidOpenrtb(builder -> builder.impid("impId1")); - final com.iab.openrtb.response.Bid bid2 = givenBidOpenrtb(builder -> builder.impid("impId2").adm("adm2")); + final com.iab.openrtb.response.Bid bid1 = givenBidOpenrtb(builder -> builder.id("bid1").impid("impId1")); + final com.iab.openrtb.response.Bid bid2 = givenBidOpenrtb(builder -> builder.id("bid2").impid("impId2") + .adm("adm2")); final Imp imp1 = givenImp(identity()); final Imp imp2 = givenImp(builder -> builder.id("impId2").video(Video.builder().build())); // when cacheService.cacheBidsOpenrtb( asList(bid1, bid2), asList(imp1, imp2), - CacheContext.builder().shouldCacheBids(true).shouldCacheVideoBids(true).build(), account, timeout); + CacheContext.builder() + .shouldCacheBids(true) + .shouldCacheVideoBids(true) + .bidderToVideoBidIdsToModify(singletonMap("bidder2", singletonList("bid2"))) + .bidderToBidIds(singletonMap("bidder1", asList("bid1", "bid2"))) + .build(), + account, timeout, 1000L); // then final ObjectNode bidObjectNode1 = mapper.valueToTree(bid1); @@ -544,7 +621,11 @@ public void cacheBidsOpenrtbShouldSendCacheRequestWithExpectedTtlFromBid() throw cacheService.cacheBidsOpenrtb( singletonList(givenBidOpenrtb(builder -> builder.impid("impId1").exp(10))), singletonList(givenImp(buider -> buider.id("impId1").exp(20))), - CacheContext.builder().shouldCacheBids(true).build(), account, timeout); + CacheContext.builder() + .shouldCacheBids(true) + .bidderToBidIds(singletonMap("bidder2", singletonList("bidId2"))) + .build(), + account, timeout, 0L); // then final BidCacheRequest bidCacheRequest = captureBidCacheRequest(); @@ -558,7 +639,12 @@ public void cacheBidsOpenrtbShouldSendCacheRequestWithExpectedTtlFromImp() throw // when cacheService.cacheBidsOpenrtb( singletonList(givenBidOpenrtb(identity())), singletonList(givenImp(buider -> buider.exp(10))), - CacheContext.builder().shouldCacheBids(true).cacheBidsTtl(20).build(), account, timeout); + CacheContext.builder() + .shouldCacheBids(true) + .bidderToBidIds(singletonMap("bidder2", singletonList("bidId2"))) + .cacheBidsTtl(20) + .build(), + account, timeout, 0L); // then final BidCacheRequest bidCacheRequest = captureBidCacheRequest(); @@ -572,7 +658,12 @@ public void cacheBidsOpenrtbShouldSendCacheRequestWithExpectedTtlFromRequest() t // when cacheService.cacheBidsOpenrtb( singletonList(givenBidOpenrtb(identity())), singletonList(givenImp(identity())), - CacheContext.builder().shouldCacheBids(true).cacheBidsTtl(10).build(), account, timeout); + CacheContext.builder() + .shouldCacheBids(true) + .bidderToBidIds(singletonMap("bidder2", singletonList("bidId2"))) + .cacheBidsTtl(10) + .build(), + account, timeout, 0L); // then final BidCacheRequest bidCacheRequest = captureBidCacheRequest(); @@ -597,8 +688,11 @@ public void cacheBidsOpenrtbShouldSendCacheRequestWithExpectedTtlFromAccountBann // when cacheService.cacheBidsOpenrtb( singletonList(givenBidOpenrtb(identity())), singletonList(givenImp(identity())), - CacheContext.builder().shouldCacheBids(true).build(), - Account.builder().bannerCacheTtl(10).build(), timeout); + CacheContext.builder() + .shouldCacheBids(true) + .bidderToBidIds(singletonMap("bidder2", singletonList("bidId2"))) + .build(), + Account.builder().bannerCacheTtl(10).build(), timeout, 0L); // then final BidCacheRequest bidCacheRequest = captureBidCacheRequest(); @@ -623,7 +717,11 @@ public void cacheBidsOpenrtbShouldSendCacheRequestWithExpectedTtlFromMediaTypeTt // when cacheService.cacheBidsOpenrtb( singletonList(givenBidOpenrtb(identity())), singletonList(givenImp(identity())), - CacheContext.builder().shouldCacheBids(true).build(), account, timeout); + CacheContext.builder() + .shouldCacheBids(true) + .bidderToBidIds(singletonMap("bidder2", singletonList("bidId2"))) + .build(), + account, timeout, 0L); // then final BidCacheRequest bidCacheRequest = captureBidCacheRequest(); @@ -648,7 +746,11 @@ public void cacheBidsOpenrtbShouldSendCacheRequestWithTtlFromMediaTypeWhenAccoun // when cacheService.cacheBidsOpenrtb( singletonList(givenBidOpenrtb(identity())), singletonList(givenImp(identity())), - CacheContext.builder().shouldCacheBids(true).build(), account, timeout); + CacheContext.builder() + .shouldCacheBids(true) + .bidderToBidIds(singletonMap("bidder2", singletonList("bidId2"))) + .build(), + account, timeout, 0L); // then final BidCacheRequest bidCacheRequest = captureBidCacheRequest(); @@ -662,7 +764,11 @@ public void cacheBidsOpenrtbShouldSendCacheRequestWithNoTtl() throws IOException // when cacheService.cacheBidsOpenrtb( singletonList(givenBidOpenrtb(identity())), singletonList(givenImp(identity())), - CacheContext.builder().shouldCacheBids(true).build(), account, timeout); + CacheContext.builder() + .shouldCacheBids(true) + .bidderToBidIds(singletonMap("bidder2", singletonList("bidId2"))) + .build(), + account, timeout, 0L); // then final BidCacheRequest bidCacheRequest = captureBidCacheRequest(); @@ -679,7 +785,11 @@ public void cacheBidsOpenrtbShouldReturnExpectedResultForBids() { // when final Future future = cacheService.cacheBidsOpenrtb( singletonList(bid), singletonList(givenImp(identity())), - CacheContext.builder().shouldCacheBids(true).build(), account, timeout); + CacheContext.builder() + .shouldCacheBids(true) + .bidderToBidIds(singletonMap("bidder2", singletonList("bidId2"))) + .build(), + account, timeout, 0L); // then assertThat(future.result().getCacheBids()).hasSize(1) @@ -695,7 +805,11 @@ public void cacheBidsOpenrtbShouldReturnExpectedResultForVideoBids() { // when final Future future = cacheService.cacheBidsOpenrtb( singletonList(bid), singletonList(imp), - CacheContext.builder().shouldCacheVideoBids(true).build(), account, timeout); + CacheContext.builder() + .shouldCacheVideoBids(true) + .bidderToVideoBidIdsToModify(singletonMap("bidder1", singletonList("bidId1"))) + .build(), + account, timeout, 0L); // then assertThat(future.result().getCacheBids()).hasSize(1) @@ -717,7 +831,13 @@ public void cacheBidsOpenrtbShouldReturnExpectedResultForBidsAndVideoBids() thro // when final Future future = cacheService.cacheBidsOpenrtb( asList(bid1, bid2), asList(imp1, imp2), - CacheContext.builder().shouldCacheBids(true).shouldCacheVideoBids(true).build(), account, timeout); + CacheContext.builder() + .shouldCacheBids(true) + .shouldCacheVideoBids(true) + .bidderToVideoBidIdsToModify(singletonMap("bidder1", singletonList("bidId1"))) + .bidderToBidIds(singletonMap("bidder2", singletonList("bidId2"))) + .build(), + account, timeout, 0L); // then assertThat(future.result().getCacheBids()).hasSize(2) @@ -737,7 +857,11 @@ public void cacheBidsOpenrtbShouldNotCacheVideoBidWithMissingImpId() { // when final Future future = cacheService.cacheBidsOpenrtb( asList(bid1, bid2), asList(imp1, imp2), - CacheContext.builder().shouldCacheVideoBids(true).build(), account, timeout); + CacheContext.builder() + .shouldCacheVideoBids(true) + .bidderToVideoBidIdsToModify(singletonMap("bidder1", singletonList("bidId1"))) + .build(), + account, timeout, 0L); // then assertThat(future.result().getCacheBids()).hasSize(1) @@ -747,16 +871,24 @@ public void cacheBidsOpenrtbShouldNotCacheVideoBidWithMissingImpId() { @Test public void cacheBidsOpenrtbShouldWrapEmptyAdMFieldUsingNurlFieldValue() throws IOException { // given - given(eventsService.winUrl(any(), any())).willReturn("http://win-url"); + given(eventsService.winUrl(anyString(), anyString(), any(), any())).willReturn("http://win-url"); - final com.iab.openrtb.response.Bid bid1 = givenBidOpenrtb(builder -> builder.impid("impId1").adm("adm1")); - final com.iab.openrtb.response.Bid bid2 = givenBidOpenrtb(builder -> builder.impid("impId1").nurl("adm2")); + final com.iab.openrtb.response.Bid bid1 = givenBidOpenrtb(builder -> builder.id("bid1").impid("impId1") + .adm("adm1")); + final com.iab.openrtb.response.Bid bid2 = givenBidOpenrtb(builder -> builder.id("bid2").impid("impId1") + .nurl("adm2")); final Imp imp1 = givenImp(builder -> builder.id("impId1").video(Video.builder().build())); // when cacheService.cacheBidsOpenrtb( asList(bid1, bid2), singletonList(imp1), - CacheContext.builder().shouldCacheBids(true).shouldCacheVideoBids(true).build(), account, timeout); + CacheContext.builder() + .shouldCacheBids(true) + .shouldCacheVideoBids(true) + .bidderToVideoBidIdsToModify(singletonMap("bidder1", singletonList("bid1"))) + .bidderToBidIds(singletonMap("bidder1", asList("bid1", "bid2"))) + .build(), + account, timeout, 0L); // then final ObjectNode bidObjectNode1 = mapper.valueToTree(bid1); @@ -779,16 +911,21 @@ public void cacheBidsOpenrtbShouldWrapEmptyAdMFieldUsingNurlFieldValue() throws @Test public void cacheBidsOpenrtbShouldNotModifyVastXmlWhenBidIdIsNotInToModifyList() throws IOException { // given - given(eventsService.winUrl(anyString(), any())).willReturn("http://win-url"); + given(eventsService.winUrl(anyString(), anyString(), any(), any())).willReturn("http://win-url"); final com.iab.openrtb.response.Bid bid = givenBidOpenrtb(builder -> builder.id("bid1").impid("impId1").adm("adm")); final Imp imp1 = givenImp(builder -> builder.id("impId1").video(Video.builder().build())); // when - cacheService.cacheBidsOpenrtb(singletonList(bid), singletonList(imp1), CacheContext.builder() - .shouldCacheBids(true).shouldCacheVideoBids(true).videoBidIdsToModify(singletonList("bid2")) - .build(), account, timeout); + cacheService.cacheBidsOpenrtb(singletonList(bid), singletonList(imp1), + CacheContext.builder() + .shouldCacheBids(true) + .shouldCacheVideoBids(true) + .bidderToVideoBidIdsToModify(singletonMap("bidder", singletonList("bid2"))) + .bidderToBidIds(singletonMap("bidder", singletonList("bid1"))) + .build(), + Account.builder().id("accountId").build(), timeout, 0L); // then final ObjectNode bidObjectNode = mapper.valueToTree(bid); @@ -803,16 +940,21 @@ public void cacheBidsOpenrtbShouldNotModifyVastXmlWhenBidIdIsNotInToModifyList() @Test public void cacheBidsOpenrtbShouldNotAddTrackingImpToBidAdmWhenXmlDoesNotContainImpTag() throws IOException { // given - given(eventsService.winUrl(anyString(), any())).willReturn("http://win-url"); + given(eventsService.winUrl(anyString(), anyString(), any(), any())).willReturn("http://win-url"); final com.iab.openrtb.response.Bid bid = givenBidOpenrtb(builder -> builder.id("bid1").impid("impId1").adm("no impression tag")); final Imp imp1 = givenImp(builder -> builder.id("impId1").video(Video.builder().build())); // when - cacheService.cacheBidsOpenrtb(singletonList(bid), singletonList(imp1), CacheContext.builder() - .shouldCacheBids(true).shouldCacheVideoBids(true).videoBidIdsToModify(singletonList("bid1")) - .build(), account, timeout); + cacheService.cacheBidsOpenrtb(singletonList(bid), singletonList(imp1), + CacheContext.builder() + .shouldCacheBids(true) + .shouldCacheVideoBids(true) + .bidderToVideoBidIdsToModify(singletonMap("bidder", singletonList("bid2"))) + .bidderToBidIds(singletonMap("bidder", singletonList("bid1"))) + .build(), + account, timeout, 0L); // then final ObjectNode bidObjectNode = mapper.valueToTree(bid); @@ -827,18 +969,23 @@ public void cacheBidsOpenrtbShouldNotAddTrackingImpToBidAdmWhenXmlDoesNotContain @Test public void cacheBidsOpenrtbShouldAddTrackingLinkToImpTagWhenItIsEmpty() throws IOException { // given - given(eventsService.vastUrlTracking(any(), any())) - .willReturn("https://test-event.com/event?t=imp&b=bid1&f=b&a=accountId"); - given(eventsService.winUrl(anyString(), any())).willReturn("http://win-url"); - - final com.iab.openrtb.response.Bid bid = givenBidOpenrtb(builder -> - builder.id("bid1").impid("impId1").adm("")); + final com.iab.openrtb.response.Bid bid = givenBidOpenrtb(builder -> builder.id("bid1").impid("impId1") + .adm("")); final Imp imp1 = givenImp(builder -> builder.id("impId1").video(Video.builder().build())); + given(eventsService.vastUrlTracking(anyString(), anyString(), any(), any())) + .willReturn("https://test-event.com/event?t=imp&b=bid1&f=b&a=accountId"); + given(eventsService.winUrl(anyString(), anyString(), any(), any())).willReturn("http://win-url"); + // when - cacheService.cacheBidsOpenrtb(singletonList(bid), singletonList(imp1), CacheContext.builder() - .shouldCacheBids(true).shouldCacheVideoBids(true).videoBidIdsToModify(singletonList("bid1")) - .build(), account, timeout); + cacheService.cacheBidsOpenrtb(singletonList(bid), singletonList(imp1), + CacheContext.builder() + .shouldCacheBids(true) + .shouldCacheVideoBids(true) + .bidderToVideoBidIdsToModify(singletonMap("bidder", singletonList("bid1"))) + .bidderToBidIds(singletonMap("bidder", singletonList("bid1"))) + .build(), + Account.builder().id("accountId").build(), timeout, 0L); final ObjectNode bidObjectNode = mapper.valueToTree(bid); bidObjectNode.put("wurl", "http://win-url"); @@ -861,19 +1008,24 @@ public void cacheBidsOpenrtbShouldAddTrackingLinkToImpTagWhenItIsEmpty() throws public void cacheBidsOpenrtbShouldAddTrackingImpToBidAdmXmlWhenThatBidShouldBeModifiedAndContainsImpTag() throws IOException { // given - given(eventsService.vastUrlTracking(any(), any())) - .willReturn("https://test-event.com/event?t=imp&b=bid1&f=b&a=accountId"); - given(eventsService.winUrl(anyString(), any())).willReturn("http://win-url"); - - final com.iab.openrtb.response.Bid bid = givenBidOpenrtb(builder -> - builder.id("bid1").impid("impId1").adm("http:/test.com")); + final com.iab.openrtb.response.Bid bid = givenBidOpenrtb(builder -> builder.id("bid1").impid("impId1") + .adm("http:/test.com")); final Imp imp1 = givenImp(builder -> builder.id("impId1").video(Video.builder().build())); + given(eventsService.vastUrlTracking(any(), any(), any(), anyLong())) + .willReturn("https://test-event.com/event?t=imp&b=bid1&f=b&a=accountId"); + given(eventsService.winUrl(anyString(), anyString(), any(), any())).willReturn("http://win-url"); + // when account = Account.builder().id("accountId").build(); - cacheService.cacheBidsOpenrtb(singletonList(bid), singletonList(imp1), CacheContext.builder() - .shouldCacheBids(true).shouldCacheVideoBids(true).videoBidIdsToModify(singletonList("bid1")) - .build(), account, timeout); + cacheService.cacheBidsOpenrtb(singletonList(bid), singletonList(imp1), + CacheContext.builder() + .shouldCacheBids(true) + .shouldCacheVideoBids(true) + .bidderToVideoBidIdsToModify(singletonMap("bidder", singletonList("bid1"))) + .bidderToBidIds(singletonMap("bidder", singletonList("bid1"))) + .build(), + Account.builder().id("accountId").build(), timeout, 0L); final ObjectNode bidObjectNode = mapper.valueToTree(bid); bidObjectNode.put("wurl", "http://win-url"); @@ -919,70 +1071,65 @@ public void cachePutObjectsShouldModifyVastAndCachePutObjects() throws IOExcepti // given final PutObject firstPutObject = PutObject.builder() .type("xml") - .bidid("biddid1") + .bidid("bidId1") .bidder("bidder1") + .timestamp(1L) .value(new TextNode("" + "prebid.org wrapper" - + "")).build(); + + "")) + .build(); final PutObject secondPutObject = PutObject.builder() .type("xml") - .value(new TextNode("VAST")) - .bidid("biddid2") + .bidid("bidId2") .bidder("bidder2") + .timestamp(1L) + .value(new TextNode("VAST")) .build(); - given(eventsService.vastUrlTracking(any(), any())) - .willReturn("https://test-event.com/event?t=imp&b=biddid1&f=b&a=account"); + given(eventsService.vastUrlTracking(any(), any(), any(), any())) + .willReturn("http://external-url/event"); // when - cacheService.cachePutObjects(Arrays.asList(firstPutObject, secondPutObject), singleton("bidder1"), "account", + cacheService.cachePutObjects(asList(firstPutObject, secondPutObject), singleton("bidder1"), "account", timeout); // then - final PutObject modifiedSecondPutObject = firstPutObject.toBuilder() + final PutObject modifiedFirstPutObject = firstPutObject.toBuilder() + .bidid(null) + .bidder(null) + .timestamp(null) .value(new TextNode("" + "prebid.org wrapper" - + "" + + "" + "")) .build(); - final BidCacheRequest bidCacheRequest = captureBidCacheRequest(); - assertThat(bidCacheRequest.getPuts()).hasSize(2).containsOnly(modifiedSecondPutObject, secondPutObject); - } - - private static List singleBidList() { - return singletonList(givenBid(identity())); - } - - private static Bid givenBid(Function bidCustomizer) { - return bidCustomizer.apply(Bid.builder()).build(); - } + final PutObject modifiedSecondPutObject = secondPutObject.toBuilder() + .bidid(null) + .bidder(null) + .timestamp(null) + .build(); - private static com.iab.openrtb.response.Bid givenBidOpenrtb( - Function bidCustomizer) { - return bidCustomizer.apply(com.iab.openrtb.response.Bid.builder()).build(); + assertThat(captureBidCacheRequest().getPuts()).hasSize(2) + .containsOnly(modifiedFirstPutObject, modifiedSecondPutObject); } - private static Imp givenImp(Function impCustomizer) { - return impCustomizer.apply(Imp.builder()).build(); - } + @Test + public void cachePutObjectsShouldCallEventsServiceWithExpectedArguments() { + // given + final PutObject firstPutObject = PutObject.builder() + .type("xml") + .bidid("bidId1") + .bidder("bidder1") + .timestamp(1000L) + .value(new TextNode("")) + .build(); - private static CacheHttpRequest givenCacheHttpRequest(com.iab.openrtb.response.Bid... bids) - throws JsonProcessingException { + // when + cacheService.cachePutObjects(singletonList(firstPutObject), singleton("bidder1"), "account", timeout); - final List putObjects; - if (bids != null) { - putObjects = new ArrayList<>(); - for (com.iab.openrtb.response.Bid bid : bids) { - final ObjectNode bidObjectNode = mapper.valueToTree(bid); - bidObjectNode.put("wurl", "http://win-url"); - putObjects.add(PutObject.builder().type("json").value(bidObjectNode).build()); - } - } else { - putObjects = null; - } - return CacheHttpRequest.of( - "http://cache-service/cache", - mapper.writeValueAsString(BidCacheRequest.of(putObjects))); + // then + verify(eventsService).vastUrlTracking(eq("bidId1"), eq("bidder1"), eq("account"), eq(1000L)); } private void givenHttpClientReturnsResponse(int statusCode, String response) { diff --git a/src/test/java/org/prebid/server/events/EventUtilTest.java b/src/test/java/org/prebid/server/events/EventUtilTest.java index b0761d49796..34e077d55cb 100644 --- a/src/test/java/org/prebid/server/events/EventUtilTest.java +++ b/src/test/java/org/prebid/server/events/EventUtilTest.java @@ -30,13 +30,11 @@ public class EventUtilTest { public void setUp() { given(routingContext.request()).willReturn(httpRequest); given(httpRequest.headers()).willReturn(new CaseInsensitiveHeaders()); + given(httpRequest.params()).willReturn(MultiMap.caseInsensitiveMultiMap()); } @Test public void validateTypeShouldFailWhenTypeIsMissing() { - // given - given(httpRequest.params()).willReturn(MultiMap.caseInsensitiveMultiMap()); - // when and then assertThatIllegalArgumentException().isThrownBy(() -> EventUtil.validateType(routingContext)) .withMessage("Type 't' is required query parameter. Possible values are win and imp, but was null"); @@ -76,25 +74,28 @@ public void validateTypeShouldSucceedWhenTypeIsImp() { } @Test - public void validateBidIdShouldFailWhenBidIdIsMissing() { - // given - given(httpRequest.params()).willReturn(MultiMap.caseInsensitiveMultiMap() - .add("t", "win")); + public void validateAccountIdShouldFailWhenAccountIsMissing() { + // when and then + assertThatIllegalArgumentException().isThrownBy(() -> EventUtil.validateAccountId(routingContext)) + .withMessage("Account 'a' is required query parameter and can't be empty"); + } + @Test + public void validateBidIdShouldFailWhenBidIdIsMissing() { // when and then assertThatIllegalArgumentException().isThrownBy(() -> EventUtil.validateBidId(routingContext)) .withMessage("BidId 'b' is required query parameter and can't be empty"); } @Test - public void validateAccountIdShouldFailWhenAccountIsMissing() { + public void validateTimestampShouldFailWhenTimestampIsInvalid() { // given given(httpRequest.params()).willReturn(MultiMap.caseInsensitiveMultiMap() - .add("b", "bidId")); + .add("ts", "invalid")); // when and then - assertThatIllegalArgumentException().isThrownBy(() -> EventUtil.validateAccountId(routingContext)) - .withMessage("Account 'a' is required query parameter and can't be empty"); + assertThatIllegalArgumentException().isThrownBy(() -> EventUtil.validateTimestamp(routingContext)) + .withMessage("Timestamp 'ts' query parameter is not valid number: invalid"); } @Test @@ -168,8 +169,10 @@ public void fromShouldReturnExpectedEventRequest() { // given given(httpRequest.params()).willReturn(MultiMap.caseInsensitiveMultiMap() .add("t", "win") - .add("b", "bidId") .add("a", "accountId") + .add("bidder", "bidder") + .add("b", "bidId") + .add("ts", "1000") .add("f", "i") .add("x", "0")); @@ -179,8 +182,10 @@ public void fromShouldReturnExpectedEventRequest() { // then assertThat(result).isEqualTo(EventRequest.builder() .type(EventRequest.Type.win) - .bidId("bidId") .accountId("accountId") + .bidder("bidder") + .bidId("bidId") + .timestamp(1000L) .format(EventRequest.Format.image) .analytics(EventRequest.Analytics.disabled) .build()); @@ -191,8 +196,10 @@ public void fromShouldReturnExpectedEventRequestWithDefaultFormatAndAnalytics() // given given(httpRequest.params()).willReturn(MultiMap.caseInsensitiveMultiMap() .add("t", "win") + .add("a", "accountId") + .add("bidder", "bidder") .add("b", "bidId") - .add("a", "accountId")); + .add("ts", "1000")); // when final EventRequest result = EventUtil.from(routingContext); @@ -200,10 +207,12 @@ public void fromShouldReturnExpectedEventRequestWithDefaultFormatAndAnalytics() // then assertThat(result).isEqualTo(EventRequest.builder() .type(EventRequest.Type.win) - .bidId("bidId") .accountId("accountId") + .bidder("bidder") + .bidId("bidId") .format(EventRequest.Format.blank) .analytics(EventRequest.Analytics.enabled) + .timestamp(1000L) .build()); } @@ -212,17 +221,20 @@ public void toUrlShouldReturnExpectedUrl() { // given final EventRequest eventRequest = EventRequest.builder() .type(EventRequest.Type.win) - .bidId("bidId") .accountId("accountId") + .bidder("bidder") + .bidId("bidId") .format(EventRequest.Format.blank) .analytics(EventRequest.Analytics.enabled) + .timestamp(1000L) .build(); // when final String result = EventUtil.toUrl("http://external-url", eventRequest); // then - assertThat(result).isEqualTo("http://external-url/event?t=win&b=bidId&a=accountId&f=b&x=1"); + assertThat(result) + .isEqualTo("http://external-url/event?t=win&b=bidId&a=accountId&ts=1000&bidder=bidder&f=b&x=1"); } @Test @@ -230,14 +242,34 @@ public void toUrlShouldReturnExpectedUrlWithoutFormatAndAnalytics() { // given final EventRequest eventRequest = EventRequest.builder() .type(EventRequest.Type.win) + .accountId("accountId") + .bidder("bidder") .bidId("bidId") + .timestamp(1000L) + .build(); + + // when + final String result = EventUtil.toUrl("http://external-url", eventRequest); + + // then + assertThat(result).isEqualTo("http://external-url/event?t=win&b=bidId&a=accountId&ts=1000&bidder=bidder"); + } + + @Test + public void toUrlShouldReturnExpectedUrlWithoutTimestamp() { + // given + final EventRequest eventRequest = EventRequest.builder() + .type(EventRequest.Type.win) .accountId("accountId") + .bidder("bidder") + .bidId("bidId") + .timestamp(null) .build(); // when final String result = EventUtil.toUrl("http://external-url", eventRequest); // then - assertThat(result).isEqualTo("http://external-url/event?t=win&b=bidId&a=accountId"); + assertThat(result).isEqualTo("http://external-url/event?t=win&b=bidId&a=accountId&bidder=bidder"); } } diff --git a/src/test/java/org/prebid/server/events/EventsServiceTest.java b/src/test/java/org/prebid/server/events/EventsServiceTest.java index db9df25f3a2..2ee78221ba7 100644 --- a/src/test/java/org/prebid/server/events/EventsServiceTest.java +++ b/src/test/java/org/prebid/server/events/EventsServiceTest.java @@ -24,29 +24,38 @@ public void setUp() { @Test public void createEventsShouldReturnExpectedEvent() { // when - final Events events = eventsService.createEvent("bidId", "accountId"); + final Events events = eventsService.createEvent("bidId", "bidder", "accountId", 1000L); // then assertThat(events).isEqualTo(Events.of( - "http://external-url/event?t=win&b=bidId&a=accountId&f=i", - "http://external-url/event?t=imp&b=bidId&a=accountId&f=i")); + "http://external-url/event?t=win&b=bidId&a=accountId&ts=1000&bidder=bidder&f=i", + "http://external-url/event?t=imp&b=bidId&a=accountId&ts=1000&bidder=bidder&f=i")); } @Test public void winUrlTargetingShouldReturnExpectedUrl() { // when - final String winUrlTargeting = eventsService.winUrlTargeting("accountId"); + final String winUrlTargeting = eventsService.winUrlTargeting("bidder", "accountId", 1000L); // then - assertThat(winUrlTargeting).isEqualTo("http://external-url/event?t=win&b=BIDID&a=accountId&f=i"); + assertThat(winUrlTargeting).isEqualTo("http://external-url/event?t=win&b=BIDID&a=accountId&ts=1000&bidder=bidder&f=i"); } @Test - public void vastUrlTrackingShouldReturnExpectedUrl() { + public void winUrlShouldReturnExpectedUrl() { // when - final String winUrlTargeting = eventsService.vastUrlTracking("bidId", "accountId"); + final String winUrl = eventsService.winUrl("bidId", "bidder", "accountId", 1000L); // then - assertThat(winUrlTargeting).isEqualTo("http://external-url/event?t=imp&b=bidId&a=accountId&f=b"); + assertThat(winUrl).isEqualTo("http://external-url/event?t=win&b=bidId&a=accountId&ts=1000&bidder=bidder&f=i"); + } + + @Test + public void vastUrlShouldReturnExpectedUrl() { + // when + final String vastUrl = eventsService.vastUrlTracking("bidId", "bidder", "accountId", 1000L); + + // then + assertThat(vastUrl).isEqualTo("http://external-url/event?t=imp&b=bidId&a=accountId&ts=1000&bidder=bidder&f=b"); } } diff --git a/src/test/java/org/prebid/server/handler/NotificationEventHandlerTest.java b/src/test/java/org/prebid/server/handler/NotificationEventHandlerTest.java index 4309fdea693..c7b023e9c2e 100644 --- a/src/test/java/org/prebid/server/handler/NotificationEventHandlerTest.java +++ b/src/test/java/org/prebid/server/handler/NotificationEventHandlerTest.java @@ -118,6 +118,24 @@ public void shouldReturnBadRequestWhenBidIdIsMissing() { assertThat(captureResponseStatusCode()).isEqualTo(400); } + @Test + public void shouldReturnBadRequestWhenTimestampIsInvalid() { + // given + given(httpRequest.params()).willReturn(MultiMap.caseInsensitiveMultiMap() + .add("t", "win") + .add("b", "bidId") + .add("bidder", "bidder") + .add("ts", "invalid")); + + // when + notificationHandler.handle(routingContext); + + // then + verifyZeroInteractions(analyticsReporter); + + assertThat(captureResponseStatusCode()).isEqualTo(400); + } + @Test public void shouldReturnUnauthorizedWhenAccountIsMissing() { // given @@ -306,6 +324,46 @@ public void shouldRespondWithNoContentWhenRequestFormatIsNotDefined() { verifyNoMoreInteractions(httpResponse); } + @Test + public void shouldPassExpectedEventToAnalyticsReporter() { + // given + given(httpRequest.params()).willReturn(MultiMap.caseInsensitiveMultiMap() + .add("t", "win") + .add("b", "bidId") + .add("a", "accountId") + .add("bidder", "bidder") + .add("ts", "1000")); + + final Account account = Account.builder().eventsEnabled(true).build(); + given(applicationSettings.getAccountById(anyString(), any())) + .willReturn(Future.succeededFuture(account)); + + // when + notificationHandler.handle(routingContext); + + // then + final Map queryParams = new HashMap<>(); + queryParams.put("t", "win"); + queryParams.put("b", "bidId"); + queryParams.put("a", "accountId"); + queryParams.put("bidder", "bidder"); + queryParams.put("ts", "1000"); + final HttpContext expectedHttpContext = HttpContext.builder() + .queryParams(queryParams) + .headers(Collections.emptyMap()) + .cookies(Collections.emptyMap()) + .build(); + + assertThat(captureAnalyticEvent()).isEqualTo(NotificationEvent.builder() + .type(NotificationEvent.Type.win) + .bidId("bidId") + .account(account) + .bidder("bidder") + .timestamp(1000L) + .httpContext(expectedHttpContext) + .build()); + } + private Integer captureResponseStatusCode() { final ArgumentCaptor captor = ArgumentCaptor.forClass(Integer.class); verify(httpResponse).setStatusCode(captor.capture()); diff --git a/src/test/java/org/prebid/server/handler/VtrackHandlerTest.java b/src/test/java/org/prebid/server/handler/VtrackHandlerTest.java index 6e43c21da26..38a3605e0e5 100644 --- a/src/test/java/org/prebid/server/handler/VtrackHandlerTest.java +++ b/src/test/java/org/prebid/server/handler/VtrackHandlerTest.java @@ -69,7 +69,9 @@ public class VtrackHandlerTest extends VertxTest { public void setUp() { given(routingContext.request()).willReturn(httpRequest); given(routingContext.response()).willReturn(httpResponse); + given(httpRequest.getParam("a")).willReturn("accountId"); + given(httpResponse.setStatusCode(anyInt())).willReturn(httpResponse); handler = new VtrackHandler( @@ -261,7 +263,8 @@ public void shouldSendToCacheExpectedPutsAndUpdatableBiddersWhenBidderVastNotAll handler.handle(routingContext); // then - verify(cacheService).cachePutObjects(eq(putObjects), eq(singleton("updatable_bidder")), eq("accountId"), any()); + verify(cacheService).cachePutObjects(eq(putObjects), eq(singleton("updatable_bidder")), eq("accountId"), + any()); verify(httpResponse).end(eq("{\"responses\":[{\"uuid\":\"uuid1\"}]}")); } @@ -316,7 +319,6 @@ public void shouldSendToCacheExpectedPutsAndUpdatableUnknownBiddersWhenUnknownBi .willReturn(givenVtrackRequest(putObjects)); given(bidderCatalog.isValidName(any())).willReturn(false); - given(bidderCatalog.isModifyingVastXmlAllowed(any())).willReturn(false); given(applicationSettings.getAccountById(any(), any())) .willReturn(Future.succeededFuture(Account.builder().eventsEnabled(true).build())); diff --git a/src/test/java/org/prebid/server/handler/openrtb2/AmpHandlerTest.java b/src/test/java/org/prebid/server/handler/openrtb2/AmpHandlerTest.java index c78cf632bfa..9b7a1863a69 100644 --- a/src/test/java/org/prebid/server/handler/openrtb2/AmpHandlerTest.java +++ b/src/test/java/org/prebid/server/handler/openrtb2/AmpHandlerTest.java @@ -417,7 +417,7 @@ public void shouldRespondWithDebugInfoIncludedIfTestFlagIsTrue() { given(exchangeService.holdAuction(any())) .willReturn(givenBidResponseWithExt(mapper.valueToTree( ExtBidResponse.of(ExtResponseDebug.of(null, auctionContext.getBidRequest()), null, null, null, - null)))); + null, 1000L)))); // when ampHandler.handle(routingContext); @@ -440,7 +440,7 @@ public void shouldRespondWithDebugInfoIncludedIfExtPrebidDebugIsOn() { given(exchangeService.holdAuction(any())) .willReturn(givenBidResponseWithExt(mapper.valueToTree( ExtBidResponse.of(ExtResponseDebug.of(null, auctionContext.getBidRequest()), null, null, null, - null)))); + null, 1000L)))); // when ampHandler.handle(routingContext); diff --git a/src/test/java/org/prebid/server/handler/openrtb2/AuctionHandlerTest.java b/src/test/java/org/prebid/server/handler/openrtb2/AuctionHandlerTest.java index 599d5ddf275..f2fe046a29a 100644 --- a/src/test/java/org/prebid/server/handler/openrtb2/AuctionHandlerTest.java +++ b/src/test/java/org/prebid/server/handler/openrtb2/AuctionHandlerTest.java @@ -302,12 +302,13 @@ public void shouldRespondWithCorrectResolvedRequestMediaTypePriceGranularity() { final BidRequest resolvedRequest = BidRequest.builder() .ext(mapper.valueToTree(ExtBidRequest.of(ExtRequestPrebid.builder() .targeting(ExtRequestTargeting.builder().mediatypepricegranularity(priceGranuality).build()) + .auctiontimestamp(0L) .build()))) .build(); given(exchangeService.holdAuction(any())) .willReturn(Future.succeededFuture(BidResponse.builder() .ext(mapper.valueToTree(ExtBidResponse.of(ExtResponseDebug.of(null, resolvedRequest), - null, null, null, null))) + null, null, null, null, null))) .build())); // when @@ -315,10 +316,9 @@ public void shouldRespondWithCorrectResolvedRequestMediaTypePriceGranularity() { // then verify(exchangeService).holdAuction(any()); - verify(httpResponse).end(eq("{\"ext\":{\"debug\":{\"resolvedrequest\":{\"ext\":{\"prebid\":" + "{\"targeting\":{\"mediatypepricegranularity\":{\"banner\":{\"precision\":1,\"ranges\":" - + "[{\"max\":10,\"increment\":1}]},\"native\":{}}}}}}}}}")); + + "[{\"max\":10,\"increment\":1}]},\"native\":{}}},\"auctiontimestamp\":0}}}}}}")); } @Test diff --git a/src/test/java/org/prebid/server/it/ApplicationTest.java b/src/test/java/org/prebid/server/it/ApplicationTest.java index 5d7e38defe1..ff7bb0c4c72 100644 --- a/src/test/java/org/prebid/server/it/ApplicationTest.java +++ b/src/test/java/org/prebid/server/it/ApplicationTest.java @@ -519,6 +519,8 @@ public void eventHandlerShouldRespondWithTrackingPixel() throws IOException { .queryParam("b", "bidId") .queryParam("a", "14062") .queryParam("f", "i") + .queryParam("bidder", "bidder") + .queryParam("ts", "1000") .get("/event"); assertThat(response.getStatusCode()).isEqualTo(200); diff --git a/src/test/resources/org/prebid/server/it/amp/test-appnexus-bid-request.json b/src/test/resources/org/prebid/server/it/amp/test-appnexus-bid-request.json index 19b183d8997..5d2a5936cc8 100644 --- a/src/test/resources/org/prebid/server/it/amp/test-appnexus-bid-request.json +++ b/src/test/resources/org/prebid/server/it/amp/test-appnexus-bid-request.json @@ -85,7 +85,8 @@ }, "cache": { "bids": {} - } + }, + "auctiontimestamp": 1000 } } } diff --git a/src/test/resources/org/prebid/server/it/amp/test-cache-request.json b/src/test/resources/org/prebid/server/it/amp/test-cache-request.json index b1dec4acc23..33b7e092d57 100644 --- a/src/test/resources/org/prebid/server/it/amp/test-cache-request.json +++ b/src/test/resources/org/prebid/server/it/amp/test-cache-request.json @@ -22,7 +22,7 @@ ] } }, - "wurl": "http://localhost:8000/event?t=win&b=326132363&a=accountId&f=i" + "wurl":"http://localhost:8000/event?t=win&b=326132363&a=accountId&ts=1000&bidder=rubicon&f=i" } }, { @@ -50,7 +50,7 @@ "ranking_price": 0.0 } }, - "wurl": "http://localhost:8000/event?t=win&b=7706636740145184841&a=accountId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=7706636740145184841&a=accountId&ts=1000&bidder=appnexus&f=i" } } ] diff --git a/src/test/resources/org/prebid/server/it/cache/update/test-auction-request.json b/src/test/resources/org/prebid/server/it/cache/update/test-auction-request.json index 07c8f80a575..a22728bd972 100644 --- a/src/test/resources/org/prebid/server/it/cache/update/test-auction-request.json +++ b/src/test/resources/org/prebid/server/it/cache/update/test-auction-request.json @@ -53,7 +53,8 @@ } } } - } + }, + "auctiontimestamp": 1000 } }, "regs": { diff --git a/src/test/resources/org/prebid/server/it/cache/update/test-auction-response.json b/src/test/resources/org/prebid/server/it/cache/update/test-auction-response.json index 8c7354b8243..a4e405fa439 100644 --- a/src/test/resources/org/prebid/server/it/cache/update/test-auction-response.json +++ b/src/test/resources/org/prebid/server/it/cache/update/test-auction-response.json @@ -77,6 +77,7 @@ "responsetimemillis": { "rubicon": "{{ rubicon.response_time_ms }}" }, + "auctiontimestamp": 1000, "tmaxrequest": 5000 } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/adform/test-auction-adform-request.json b/src/test/resources/org/prebid/server/it/openrtb2/adform/test-auction-adform-request.json index 52c7bcdf690..9300beea1f3 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/adform/test-auction-adform-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/adform/test-auction-adform-request.json @@ -67,7 +67,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } }, "user": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/adform/test-auction-adform-response.json b/src/test/resources/org/prebid/server/it/openrtb2/adform/test-auction-adform-response.json index 0bdff9dc796..4e87a08fa92 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/adform/test-auction-adform-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/adform/test-auction-adform-response.json @@ -48,6 +48,7 @@ "adform": "{{ adform.response_time_ms }}", "cache": "{{ cache.response_time_ms }}" }, + "auctiontimestamp": 1000, "tmaxrequest": 5000 } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/adform/test-cache-adform-request.json b/src/test/resources/org/prebid/server/it/openrtb2/adform/test-cache-adform-request.json index eb795276b23..f3f344f1bbb 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/adform/test-cache-adform-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/adform/test-cache-adform-request.json @@ -10,8 +10,8 @@ "crid": "crid12", "w": 400, "h": 300, - "wurl": "http://localhost:8000/event?t=win&b=impId12&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=impId12&a=publisherId&ts=1000&bidder=adform&f=i" } } ] -} \ No newline at end of file +} diff --git a/src/test/resources/org/prebid/server/it/openrtb2/adkernel/test-adkernel-bid-request.json b/src/test/resources/org/prebid/server/it/openrtb2/adkernel/test-adkernel-bid-request.json index 7333107f5a9..ac6ff0be2a9 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/adkernel/test-adkernel-bid-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/adkernel/test-adkernel-bid-request.json @@ -83,7 +83,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } \ No newline at end of file diff --git a/src/test/resources/org/prebid/server/it/openrtb2/adkernel/test-auction-adkernel-request.json b/src/test/resources/org/prebid/server/it/openrtb2/adkernel/test-auction-adkernel-request.json index 236c9f68f6d..0456a9e3be5 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/adkernel/test-auction-adkernel-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/adkernel/test-auction-adkernel-request.json @@ -74,7 +74,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } }, "user": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/adkernel/test-auction-adkernel-response.json b/src/test/resources/org/prebid/server/it/openrtb2/adkernel/test-auction-adkernel-response.json index b3916034d35..61eed6479fa 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/adkernel/test-auction-adkernel-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/adkernel/test-auction-adkernel-response.json @@ -55,6 +55,7 @@ "adkernel": "{{ adkernel.response_time_ms }}", "cache": "{{ cache.response_time_ms }}" }, + "auctiontimestamp": 1000, "tmaxrequest": 5000 } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/adkernel/test-cache-adkernel-request.json b/src/test/resources/org/prebid/server/it/openrtb2/adkernel/test-cache-adkernel-request.json index e82a163f632..02daac81700 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/adkernel/test-cache-adkernel-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/adkernel/test-cache-adkernel-request.json @@ -13,7 +13,7 @@ ], "cid": "1001", "crid": "2002", - "wurl": "http://localhost:8000/event?t=win&b=bid02&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=bid02&a=publisherId&ts=1000&bidder=adkernel&f=i" } }, { @@ -22,4 +22,4 @@ "expiry": 120 } ] -} \ No newline at end of file +} diff --git a/src/test/resources/org/prebid/server/it/openrtb2/adkerneladn/test-adkerneladn-bid-request-1.json b/src/test/resources/org/prebid/server/it/openrtb2/adkerneladn/test-adkerneladn-bid-request-1.json index 35df26f929f..abdefd13106 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/adkerneladn/test-adkerneladn-bid-request-1.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/adkerneladn/test-adkerneladn-bid-request-1.json @@ -85,7 +85,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } \ No newline at end of file diff --git a/src/test/resources/org/prebid/server/it/openrtb2/adkerneladn/test-adkerneladn-bid-request-2.json b/src/test/resources/org/prebid/server/it/openrtb2/adkerneladn/test-adkerneladn-bid-request-2.json index cd2581b57e2..943963595bb 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/adkerneladn/test-adkerneladn-bid-request-2.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/adkerneladn/test-adkerneladn-bid-request-2.json @@ -82,7 +82,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } \ No newline at end of file diff --git a/src/test/resources/org/prebid/server/it/openrtb2/adkerneladn/test-auction-adkerneladn-request.json b/src/test/resources/org/prebid/server/it/openrtb2/adkerneladn/test-auction-adkerneladn-request.json index 7e97b07e62f..6acd3303555 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/adkerneladn/test-auction-adkerneladn-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/adkerneladn/test-auction-adkerneladn-request.json @@ -85,7 +85,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } }, "user": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/adkerneladn/test-auction-adkerneladn-response.json b/src/test/resources/org/prebid/server/it/openrtb2/adkerneladn/test-auction-adkerneladn-response.json index be5698f1d68..7db1946c22d 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/adkerneladn/test-auction-adkerneladn-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/adkerneladn/test-auction-adkerneladn-response.json @@ -100,6 +100,7 @@ "adkernelAdn": "{{ adkernelAdn.response_time_ms }}", "cache": "{{ cache.response_time_ms }}" }, + "auctiontimestamp": 1000, "tmaxrequest": 5000 } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/adkerneladn/test-cache-adkerneladn-request.json b/src/test/resources/org/prebid/server/it/openrtb2/adkerneladn/test-cache-adkerneladn-request.json index 15ea5e47406..de51f5220df 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/adkerneladn/test-cache-adkerneladn-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/adkerneladn/test-cache-adkerneladn-request.json @@ -16,7 +16,7 @@ "cat": [ "IAB2" ], - "wurl": "http://localhost:8000/event?t=win&b=bid02&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=bid02&a=publisherId&ts=1000&bidder=adkernelAdn&f=i" } }, { @@ -37,7 +37,7 @@ ], "w": 300, "h": 250, - "wurl": "http://localhost:8000/event?t=win&b=wehM-93KGr0_0_0&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=wehM-93KGr0_0_0&a=publisherId&ts=1000&bidder=adkernelAdn&f=i" } }, { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/adpone/test-adpone-bid-request.json b/src/test/resources/org/prebid/server/it/openrtb2/adpone/test-adpone-bid-request.json index 306e77c6af5..50153c54629 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/adpone/test-adpone-bid-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/adpone/test-adpone-bid-request.json @@ -91,7 +91,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } \ No newline at end of file diff --git a/src/test/resources/org/prebid/server/it/openrtb2/adpone/test-auction-adpone-request.json b/src/test/resources/org/prebid/server/it/openrtb2/adpone/test-auction-adpone-request.json index 8e359cdb9aa..32ba0bc3c36 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/adpone/test-auction-adpone-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/adpone/test-auction-adpone-request.json @@ -66,7 +66,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } }, "user": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/adpone/test-auction-adpone-response.json b/src/test/resources/org/prebid/server/it/openrtb2/adpone/test-auction-adpone-response.json index 23f550ea643..599c31a5095 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/adpone/test-auction-adpone-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/adpone/test-auction-adpone-response.json @@ -50,6 +50,7 @@ "adpone": "{{ adpone.response_time_ms }}", "cache": "{{ cache.response_time_ms }}" }, + "auctiontimestamp": 1000, "tmaxrequest": 5000 } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/adpone/test-cache-adpone-request.json b/src/test/resources/org/prebid/server/it/openrtb2/adpone/test-cache-adpone-request.json index ae8922f71ca..611a7a07fb2 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/adpone/test-cache-adpone-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/adpone/test-cache-adpone-request.json @@ -12,7 +12,7 @@ "crid": "crid001", "w": 300, "h": 250, - "wurl": "http://localhost:8000/event?t=win&b=bid001&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=bid001&a=publisherId&ts=1000&bidder=adpone&f=i" } } ] diff --git a/src/test/resources/org/prebid/server/it/openrtb2/adtelligent/test-adtelligent-bid-request-1.json b/src/test/resources/org/prebid/server/it/openrtb2/adtelligent/test-adtelligent-bid-request-1.json index 0afe60547e2..447ad796d5e 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/adtelligent/test-adtelligent-bid-request-1.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/adtelligent/test-adtelligent-bid-request-1.json @@ -95,7 +95,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } \ No newline at end of file diff --git a/src/test/resources/org/prebid/server/it/openrtb2/adtelligent/test-auction-adtelligent-request.json b/src/test/resources/org/prebid/server/it/openrtb2/adtelligent/test-auction-adtelligent-request.json index e55018f468a..46890b1bc04 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/adtelligent/test-auction-adtelligent-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/adtelligent/test-auction-adtelligent-request.json @@ -69,7 +69,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } }, "user": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/adtelligent/test-auction-adtelligent-response.json b/src/test/resources/org/prebid/server/it/openrtb2/adtelligent/test-auction-adtelligent-response.json index 57fd0ffc15f..4451513e83c 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/adtelligent/test-auction-adtelligent-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/adtelligent/test-auction-adtelligent-response.json @@ -48,6 +48,7 @@ "adtelligent": "{{ adtelligent.response_time_ms }}", "cache": "{{ cache.response_time_ms }}" }, + "auctiontimestamp": 1000, "tmaxrequest": 5000 } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/adtelligent/test-cache-adtelligent-request.json b/src/test/resources/org/prebid/server/it/openrtb2/adtelligent/test-cache-adtelligent-request.json index 679cd8718bf..2ba27f9f121 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/adtelligent/test-cache-adtelligent-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/adtelligent/test-cache-adtelligent-request.json @@ -10,7 +10,7 @@ "crid": "crid14", "w": 300, "h": 250, - "wurl": "http://localhost:8000/event?t=win&b=620160380&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=620160380&a=publisherId&ts=1000&bidder=adtelligent&f=i" } } ] diff --git a/src/test/resources/org/prebid/server/it/openrtb2/advangelists/test-advangelists-bid-request.json b/src/test/resources/org/prebid/server/it/openrtb2/advangelists/test-advangelists-bid-request.json index 4e020c53e9f..ad874900cdb 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/advangelists/test-advangelists-bid-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/advangelists/test-advangelists-bid-request.json @@ -90,7 +90,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/advangelists/test-auction-advangelists-request.json b/src/test/resources/org/prebid/server/it/openrtb2/advangelists/test-auction-advangelists-request.json index d632c2f9f30..147ad617231 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/advangelists/test-auction-advangelists-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/advangelists/test-auction-advangelists-request.json @@ -74,7 +74,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } }, "user": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/advangelists/test-auction-advangelists-response.json b/src/test/resources/org/prebid/server/it/openrtb2/advangelists/test-auction-advangelists-response.json index f0af2b8b824..809fa0cfb6d 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/advangelists/test-auction-advangelists-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/advangelists/test-auction-advangelists-response.json @@ -45,6 +45,7 @@ "advangelists": "{{ advangelists.response_time_ms }}", "cache": "{{ cache.response_time_ms }}" }, + "auctiontimestamp": 1000, "tmaxrequest": 5000 } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/advangelists/test-cache-advangelists-request.json b/src/test/resources/org/prebid/server/it/openrtb2/advangelists/test-cache-advangelists-request.json index 865fb094c3d..6d09f083cc9 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/advangelists/test-cache-advangelists-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/advangelists/test-cache-advangelists-request.json @@ -9,7 +9,8 @@ "id": "testid", "impid": "testimpid", "cid": "8048", - "wurl": "http://localhost:8000/event?t=win&b=testid&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=testid&a=publisherId&ts=1000&bidder=advangelists&f=i" + } } ] diff --git a/src/test/resources/org/prebid/server/it/openrtb2/applogy/test-applogy-bid-request-1.json b/src/test/resources/org/prebid/server/it/openrtb2/applogy/test-applogy-bid-request-1.json index 5fd62f269c3..f31037b2981 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/applogy/test-applogy-bid-request-1.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/applogy/test-applogy-bid-request-1.json @@ -92,7 +92,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } \ No newline at end of file diff --git a/src/test/resources/org/prebid/server/it/openrtb2/applogy/test-applogy-bid-request-2.json b/src/test/resources/org/prebid/server/it/openrtb2/applogy/test-applogy-bid-request-2.json index 8ae2278a549..96a6d424262 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/applogy/test-applogy-bid-request-2.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/applogy/test-applogy-bid-request-2.json @@ -93,7 +93,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } \ No newline at end of file diff --git a/src/test/resources/org/prebid/server/it/openrtb2/applogy/test-auction-applogy-request.json b/src/test/resources/org/prebid/server/it/openrtb2/applogy/test-auction-applogy-request.json index c0fd8451183..93b86d9a384 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/applogy/test-auction-applogy-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/applogy/test-auction-applogy-request.json @@ -85,7 +85,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } }, "user": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/applogy/test-auction-applogy-response.json b/src/test/resources/org/prebid/server/it/openrtb2/applogy/test-auction-applogy-response.json index 1906c22d2de..9bad51629dc 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/applogy/test-auction-applogy-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/applogy/test-auction-applogy-response.json @@ -92,6 +92,7 @@ "applogy": "{{ applogy.response_time_ms }}", "cache": "{{ cache.response_time_ms }}" }, + "auctiontimestamp": 1000, "tmaxrequest": 5000 } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/applogy/test-cache-applogy-request.json b/src/test/resources/org/prebid/server/it/openrtb2/applogy/test-cache-applogy-request.json index 3ffc9cad48a..7fe7a9322de 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/applogy/test-cache-applogy-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/applogy/test-cache-applogy-request.json @@ -12,7 +12,7 @@ "crid": "crid001", "w": 300, "h": 250, - "wurl": "http://localhost:8000/event?t=win&b=bid001&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=bid001&a=publisherId&ts=1000&bidder=applogy&f=i" } }, { @@ -27,7 +27,7 @@ "crid": "crid002", "w": 1024, "h": 576, - "wurl": "http://localhost:8000/event?t=win&b=bid002&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=bid002&a=publisherId&ts=1000&bidder=applogy&f=i" } }, { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/beachfront/test-auction-beachfront-request.json b/src/test/resources/org/prebid/server/it/openrtb2/beachfront/test-auction-beachfront-request.json index 37921593032..3b0f2b888a2 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/beachfront/test-auction-beachfront-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/beachfront/test-auction-beachfront-request.json @@ -97,7 +97,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } }, "user": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/beachfront/test-auction-beachfront-response.json b/src/test/resources/org/prebid/server/it/openrtb2/beachfront/test-auction-beachfront-response.json index 770e6c31877..f9590214adb 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/beachfront/test-auction-beachfront-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/beachfront/test-auction-beachfront-response.json @@ -48,6 +48,7 @@ "beachfront": "{{ beachfront.response_time_ms }}", "cache": "{{ cache.response_time_ms }}" }, + "auctiontimestamp": 1000, "tmaxrequest": 5000 } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/beachfront/test-beachfront-bid-request-1.json b/src/test/resources/org/prebid/server/it/openrtb2/beachfront/test-beachfront-bid-request-1.json index 5b2721aa85b..0613ce23df8 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/beachfront/test-beachfront-bid-request-1.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/beachfront/test-beachfront-bid-request-1.json @@ -92,7 +92,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/beachfront/test-beachfront-bid-request-2.json b/src/test/resources/org/prebid/server/it/openrtb2/beachfront/test-beachfront-bid-request-2.json index 2832876e651..1bbcb279448 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/beachfront/test-beachfront-bid-request-2.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/beachfront/test-beachfront-bid-request-2.json @@ -91,7 +91,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/beachfront/test-cache-beachfront-request.json b/src/test/resources/org/prebid/server/it/openrtb2/beachfront/test-cache-beachfront-request.json index b58de269332..48ec5aed939 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/beachfront/test-cache-beachfront-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/beachfront/test-cache-beachfront-request.json @@ -10,7 +10,7 @@ "crid": "crid_3", "w": 300, "h": 250, - "wurl": "http://localhost:8000/event?t=win&b=div-gpt-ad-1460505748561-0Banner&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=div-gpt-ad-1460505748561-0Banner&a=publisherId&ts=1000&bidder=beachfront&f=i" } } ] diff --git a/src/test/resources/org/prebid/server/it/openrtb2/brightroll/test-auction-brightroll-request.json b/src/test/resources/org/prebid/server/it/openrtb2/brightroll/test-auction-brightroll-request.json index 190ea33de08..24013721fde 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/brightroll/test-auction-brightroll-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/brightroll/test-auction-brightroll-request.json @@ -68,7 +68,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } }, "user": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/brightroll/test-auction-brightroll-response.json b/src/test/resources/org/prebid/server/it/openrtb2/brightroll/test-auction-brightroll-response.json index 4e933f09cc7..e820d308570 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/brightroll/test-auction-brightroll-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/brightroll/test-auction-brightroll-response.json @@ -48,6 +48,7 @@ "brightroll": "{{ brightroll.response_time_ms }}", "cache": "{{ cache.response_time_ms }}" }, + "auctiontimestamp": 1000, "tmaxrequest": 5000 } } \ No newline at end of file diff --git a/src/test/resources/org/prebid/server/it/openrtb2/brightroll/test-brightroll-bid-request-1.json b/src/test/resources/org/prebid/server/it/openrtb2/brightroll/test-brightroll-bid-request-1.json index f7da5b4cb6c..4974ccab9c5 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/brightroll/test-brightroll-bid-request-1.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/brightroll/test-brightroll-bid-request-1.json @@ -93,7 +93,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } \ No newline at end of file diff --git a/src/test/resources/org/prebid/server/it/openrtb2/brightroll/test-cache-brightroll-request.json b/src/test/resources/org/prebid/server/it/openrtb2/brightroll/test-cache-brightroll-request.json index 49d541b49df..4ec2f487c57 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/brightroll/test-cache-brightroll-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/brightroll/test-cache-brightroll-request.json @@ -10,7 +10,7 @@ "crid": "crid17", "w": 300, "h": 250, - "wurl": "http://localhost:8000/event?t=win&b=620160380&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=620160380&a=publisherId&ts=1000&bidder=brightroll&f=i" } } ] diff --git a/src/test/resources/org/prebid/server/it/openrtb2/consumable/test-auction-consumable-request.json b/src/test/resources/org/prebid/server/it/openrtb2/consumable/test-auction-consumable-request.json index d15ced8d4bd..120674cdab9 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/consumable/test-auction-consumable-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/consumable/test-auction-consumable-request.json @@ -69,7 +69,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } }, "user": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/consumable/test-auction-consumable-response.json b/src/test/resources/org/prebid/server/it/openrtb2/consumable/test-auction-consumable-response.json index 78bffe382c2..526c1bd3bb4 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/consumable/test-auction-consumable-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/consumable/test-auction-consumable-response.json @@ -49,6 +49,7 @@ "cache": "{{ cache.response_time_ms }}", "consumable": "{{ consumable.response_time_ms }}" }, + "auctiontimestamp": 1000, "tmaxrequest": 5000 } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/consumable/test-cache-consumable-request.json b/src/test/resources/org/prebid/server/it/openrtb2/consumable/test-cache-consumable-request.json index e33ea7a65a7..865f06a8604 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/consumable/test-cache-consumable-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/consumable/test-cache-consumable-request.json @@ -11,7 +11,7 @@ "w": 300, "h": 250, "exp": 30, - "wurl": "http://localhost:8000/event?t=win&b=tid&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=tid&a=publisherId&ts=1000&bidder=consumable&f=i" }, "expiry": 30 } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/conversant/alias/test-auction-conversant-request.json b/src/test/resources/org/prebid/server/it/openrtb2/conversant/alias/test-auction-conversant-request.json index f1f9ee28ab2..d01f1bf96e3 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/conversant/alias/test-auction-conversant-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/conversant/alias/test-auction-conversant-request.json @@ -71,7 +71,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } }, "user": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/conversant/alias/test-auction-conversant-response.json b/src/test/resources/org/prebid/server/it/openrtb2/conversant/alias/test-auction-conversant-response.json index acf323957ac..28e23aa16d5 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/conversant/alias/test-auction-conversant-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/conversant/alias/test-auction-conversant-response.json @@ -48,6 +48,7 @@ "conversantAlias": "{{ conversantAlias.response_time_ms }}", "cache": "{{ cache.response_time_ms }}" }, + "auctiontimestamp": 1000, "tmaxrequest": 5000 } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/conversant/alias/test-cache-conversant-request.json b/src/test/resources/org/prebid/server/it/openrtb2/conversant/alias/test-cache-conversant-request.json index a4fd81a02ce..f2315fd0101 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/conversant/alias/test-cache-conversant-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/conversant/alias/test-cache-conversant-request.json @@ -10,7 +10,7 @@ "crid": "crid4", "w": 300, "h": 600, - "wurl": "http://localhost:8000/event?t=win&b=671800140&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=671800140&a=publisherId&ts=1000&bidder=conversantAlias&f=i" } } ] diff --git a/src/test/resources/org/prebid/server/it/openrtb2/conversant/alias/test-conversant-bid-request.json b/src/test/resources/org/prebid/server/it/openrtb2/conversant/alias/test-conversant-bid-request.json index 809a716d36d..cf565a200fb 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/conversant/alias/test-conversant-bid-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/conversant/alias/test-conversant-bid-request.json @@ -99,7 +99,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } \ No newline at end of file diff --git a/src/test/resources/org/prebid/server/it/openrtb2/conversant/test-auction-conversant-request.json b/src/test/resources/org/prebid/server/it/openrtb2/conversant/test-auction-conversant-request.json index 462f3d888da..e85a75f9280 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/conversant/test-auction-conversant-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/conversant/test-auction-conversant-request.json @@ -83,7 +83,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } }, "user": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/conversant/test-auction-conversant-response.json b/src/test/resources/org/prebid/server/it/openrtb2/conversant/test-auction-conversant-response.json index bca69a9e76e..707afc67f9e 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/conversant/test-auction-conversant-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/conversant/test-auction-conversant-response.json @@ -88,6 +88,7 @@ "conversant": "{{ conversant.response_time_ms }}", "cache": "{{ cache.response_time_ms }}" }, + "auctiontimestamp": 1000, "tmaxrequest": 5000 } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/conversant/test-cache-conversant-request.json b/src/test/resources/org/prebid/server/it/openrtb2/conversant/test-cache-conversant-request.json index 0bfc17bbcb3..6a3993b2745 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/conversant/test-cache-conversant-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/conversant/test-cache-conversant-request.json @@ -10,7 +10,7 @@ "crid": "crid4", "w": 300, "h": 600, - "wurl": "http://localhost:8000/event?t=win&b=789353336&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=789353336&a=publisherId&ts=1000&bidder=conversant&f=i" } }, { @@ -23,7 +23,7 @@ "crid": "crid41", "w": 300, "h": 600, - "wurl": "http://localhost:8000/event?t=win&b=981876692&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=981876692&a=publisherId&ts=1000&bidder=conversant&f=i" } }, { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/conversant/test-conversant-bid-request.json b/src/test/resources/org/prebid/server/it/openrtb2/conversant/test-conversant-bid-request.json index 32f9fe2d86d..d6740b1c74b 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/conversant/test-conversant-bid-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/conversant/test-conversant-bid-request.json @@ -113,7 +113,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } \ No newline at end of file diff --git a/src/test/resources/org/prebid/server/it/openrtb2/cpmstar/test-auction-cpmstar-request.json b/src/test/resources/org/prebid/server/it/openrtb2/cpmstar/test-auction-cpmstar-request.json index 21df0f56957..09b70872213 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/cpmstar/test-auction-cpmstar-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/cpmstar/test-auction-cpmstar-request.json @@ -87,7 +87,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } }, "user": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/cpmstar/test-auction-cpmstar-response.json b/src/test/resources/org/prebid/server/it/openrtb2/cpmstar/test-auction-cpmstar-response.json index 0b120b97e06..f981726a34f 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/cpmstar/test-auction-cpmstar-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/cpmstar/test-auction-cpmstar-response.json @@ -92,6 +92,7 @@ "cpmstar": "{{ cpmstar.response_time_ms }}", "cache": "{{ cache.response_time_ms }}" }, + "auctiontimestamp": 1000, "tmaxrequest": 5000 } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/cpmstar/test-cache-cpmstar-request.json b/src/test/resources/org/prebid/server/it/openrtb2/cpmstar/test-cache-cpmstar-request.json index 3ffc9cad48a..161aceda9b0 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/cpmstar/test-cache-cpmstar-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/cpmstar/test-cache-cpmstar-request.json @@ -12,7 +12,7 @@ "crid": "crid001", "w": 300, "h": 250, - "wurl": "http://localhost:8000/event?t=win&b=bid001&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=bid001&a=publisherId&ts=1000&bidder=cpmstar&f=i" } }, { @@ -27,7 +27,7 @@ "crid": "crid002", "w": 1024, "h": 576, - "wurl": "http://localhost:8000/event?t=win&b=bid002&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=bid002&a=publisherId&ts=1000&bidder=cpmstar&f=i" } }, { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/cpmstar/test-cpmstar-bid-request-1.json b/src/test/resources/org/prebid/server/it/openrtb2/cpmstar/test-cpmstar-bid-request-1.json index 79a88a33687..651f8d92c92 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/cpmstar/test-cpmstar-bid-request-1.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/cpmstar/test-cpmstar-bid-request-1.json @@ -110,7 +110,8 @@ "vastxml":{ "ttlseconds":120 } - } + }, + "auctiontimestamp": 1000 } } } \ No newline at end of file diff --git a/src/test/resources/org/prebid/server/it/openrtb2/datablocks/test-auction-datablocks-request.json b/src/test/resources/org/prebid/server/it/openrtb2/datablocks/test-auction-datablocks-request.json index 447b1f5c981..40e27c0d84b 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/datablocks/test-auction-datablocks-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/datablocks/test-auction-datablocks-request.json @@ -85,7 +85,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } }, "user": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/datablocks/test-auction-datablocks-response.json b/src/test/resources/org/prebid/server/it/openrtb2/datablocks/test-auction-datablocks-response.json index 55b896256b3..bb6173290ca 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/datablocks/test-auction-datablocks-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/datablocks/test-auction-datablocks-response.json @@ -94,7 +94,7 @@ "cache": [ { "uri": "{{ cache.endpoint }}", - "requestbody": "{\"puts\":[{\"type\":\"json\",\"value\":{\"id\":\"bid001\",\"impid\":\"impId001\",\"price\":7.77,\"adm\":\"adm001\",\"adid\":\"adid001\",\"cid\":\"cid001\",\"crid\":\"crid001\",\"w\":300,\"h\":250,\"wurl\":\"http://localhost:8000/event?t=win&b=bid001&a=publisherId&f=i\"}},{\"type\":\"json\",\"value\":{\"id\":\"bid002\",\"impid\":\"impId002\",\"price\":9.99,\"adomain\":[\"psacentral.org\"],\"cid\":\"cid002\",\"crid\":\"crid002\",\"w\":300,\"h\":250,\"wurl\":\"http://localhost:8000/event?t=win&b=bid002&a=publisherId&f=i\"}},{\"type\":\"xml\",\"value\":\"prebid.org wrapper\",\"expiry\":120}]}", + "requestbody": "{\"puts\":[{\"type\":\"json\",\"value\":{\"id\":\"bid001\",\"impid\":\"impId001\",\"price\":7.77,\"adm\":\"adm001\",\"adid\":\"adid001\",\"cid\":\"cid001\",\"crid\":\"crid001\",\"w\":300,\"h\":250,\"wurl\":\"http://localhost:8000/event?t=win&b=bid001&a=publisherId&ts=1000&bidder=datablocks&f=i\"}},{\"type\":\"json\",\"value\":{\"id\":\"bid002\",\"impid\":\"impId002\",\"price\":9.99,\"adomain\":[\"psacentral.org\"],\"cid\":\"cid002\",\"crid\":\"crid002\",\"w\":300,\"h\":250,\"wurl\":\"http://localhost:8000/event?t=win&b=bid002&a=publisherId&ts=1000&bidder=datablocks&f=i\"}},{\"type\":\"xml\",\"value\":\"prebid.org wrapper\",\"expiry\":120}]}", "responsebody": "{\"responses\":[{\"uuid\":\"c1662cf6-f00a-4066-b71a-46d97abccc35\"},{\"uuid\":\"dbaa191c-5a56-4655-85eb-da079f94e09f\"},{\"uuid\":\"62019cff-d657-42fc-8366-16c34e1fd28c\"}]}", "status": 200 } @@ -102,13 +102,13 @@ "datablocks": [ { "uri": "{{ datablocks.exchange_uri }}?sid=2", - "requestbody": "{\"id\":\"tid\",\"imp\":[{\"id\":\"impId002\",\"video\":{\"mimes\":[\"video/mp4\"],\"w\":300,\"h\":250,\"pos\":1},\"ext\":{\"bidder\":{\"host\":\"localhost:8090\",\"sourceId\":2}}}],\"site\":{\"domain\":\"example.com\",\"page\":\"http://www.example.com\",\"publisher\":{\"id\":\"publisherId\"},\"ext\":{\"amp\":0}},\"device\":{\"ua\":\"userAgent\",\"dnt\":2,\"ip\":\"193.168.244.1\",\"pxratio\":4.2,\"language\":\"en\",\"ifa\":\"ifaId\"},\"user\":{\"buyeruid\":\"DB-UID\",\"ext\":{\"consent\":\"consentValue\",\"digitrust\":{\"id\":\"id\",\"keyv\":123,\"pref\":0}}},\"at\":1,\"tmax\":5000,\"cur\":[\"USD\"],\"source\":{\"fd\":1,\"tid\":\"tid\"},\"regs\":{\"ext\":{\"gdpr\":0}},\"ext\":{\"prebid\":{\"debug\":1,\"targeting\":{\"pricegranularity\":{\"precision\":2,\"ranges\":[{\"max\":20,\"increment\":0.1}]},\"currency\":{\"rates\":{\"EUR\":{\"USD\":1.2406},\"USD\":{\"EUR\":0.811}}},\"includewinners\":true,\"includebidderkeys\":true},\"cache\":{\"bids\":{},\"vastxml\":{\"ttlseconds\":120}}}}}", + "requestbody": "{\"id\":\"tid\",\"imp\":[{\"id\":\"impId002\",\"video\":{\"mimes\":[\"video/mp4\"],\"w\":300,\"h\":250,\"pos\":1},\"ext\":{\"bidder\":{\"host\":\"localhost:8090\",\"sourceId\":2}}}],\"site\":{\"domain\":\"example.com\",\"page\":\"http://www.example.com\",\"publisher\":{\"id\":\"publisherId\"},\"ext\":{\"amp\":0}},\"device\":{\"ua\":\"userAgent\",\"dnt\":2,\"ip\":\"193.168.244.1\",\"pxratio\":4.2,\"language\":\"en\",\"ifa\":\"ifaId\"},\"user\":{\"buyeruid\":\"DB-UID\",\"ext\":{\"consent\":\"consentValue\",\"digitrust\":{\"id\":\"id\",\"keyv\":123,\"pref\":0}}},\"at\":1,\"tmax\":5000,\"cur\":[\"USD\"],\"source\":{\"fd\":1,\"tid\":\"tid\"},\"regs\":{\"ext\":{\"gdpr\":0}},\"ext\":{\"prebid\":{\"debug\":1,\"targeting\":{\"pricegranularity\":{\"precision\":2,\"ranges\":[{\"max\":20,\"increment\":0.1}]},\"currency\":{\"rates\":{\"EUR\":{\"USD\":1.2406},\"USD\":{\"EUR\":0.811}}},\"includewinners\":true,\"includebidderkeys\":true},\"cache\":{\"bids\":{},\"vastxml\":{\"ttlseconds\":120}},\"auctiontimestamp\":1000}}}", "responsebody": "{\"id\":\"tid\",\"seatbid\":[{\"bid\":[{\"id\":\"bid002\",\"impid\":\"impId002\",\"price\":9.99,\"crid\":\"crid002\",\"cid\":\"cid002\",\"adomain\":[\"psacentral.org\"],\"h\":250,\"w\":300}],\"seat\":\"datablocks\"}]}", "status": 200 }, { "uri": "{{ datablocks.exchange_uri }}?sid=1", - "requestbody": "{\"id\":\"tid\",\"imp\":[{\"id\":\"impId001\",\"banner\":{\"format\":[{\"w\":300,\"h\":250}]},\"ext\":{\"bidder\":{\"host\":\"localhost:8090\",\"sourceId\":1}}}],\"site\":{\"domain\":\"example.com\",\"page\":\"http://www.example.com\",\"publisher\":{\"id\":\"publisherId\"},\"ext\":{\"amp\":0}},\"device\":{\"ua\":\"userAgent\",\"dnt\":2,\"ip\":\"193.168.244.1\",\"pxratio\":4.2,\"language\":\"en\",\"ifa\":\"ifaId\"},\"user\":{\"buyeruid\":\"DB-UID\",\"ext\":{\"consent\":\"consentValue\",\"digitrust\":{\"id\":\"id\",\"keyv\":123,\"pref\":0}}},\"at\":1,\"tmax\":5000,\"cur\":[\"USD\"],\"source\":{\"fd\":1,\"tid\":\"tid\"},\"regs\":{\"ext\":{\"gdpr\":0}},\"ext\":{\"prebid\":{\"debug\":1,\"targeting\":{\"pricegranularity\":{\"precision\":2,\"ranges\":[{\"max\":20,\"increment\":0.1}]},\"currency\":{\"rates\":{\"EUR\":{\"USD\":1.2406},\"USD\":{\"EUR\":0.811}}},\"includewinners\":true,\"includebidderkeys\":true},\"cache\":{\"bids\":{},\"vastxml\":{\"ttlseconds\":120}}}}}", + "requestbody": "{\"id\":\"tid\",\"imp\":[{\"id\":\"impId001\",\"banner\":{\"format\":[{\"w\":300,\"h\":250}]},\"ext\":{\"bidder\":{\"host\":\"localhost:8090\",\"sourceId\":1}}}],\"site\":{\"domain\":\"example.com\",\"page\":\"http://www.example.com\",\"publisher\":{\"id\":\"publisherId\"},\"ext\":{\"amp\":0}},\"device\":{\"ua\":\"userAgent\",\"dnt\":2,\"ip\":\"193.168.244.1\",\"pxratio\":4.2,\"language\":\"en\",\"ifa\":\"ifaId\"},\"user\":{\"buyeruid\":\"DB-UID\",\"ext\":{\"consent\":\"consentValue\",\"digitrust\":{\"id\":\"id\",\"keyv\":123,\"pref\":0}}},\"at\":1,\"tmax\":5000,\"cur\":[\"USD\"],\"source\":{\"fd\":1,\"tid\":\"tid\"},\"regs\":{\"ext\":{\"gdpr\":0}},\"ext\":{\"prebid\":{\"debug\":1,\"targeting\":{\"pricegranularity\":{\"precision\":2,\"ranges\":[{\"max\":20,\"increment\":0.1}]},\"currency\":{\"rates\":{\"EUR\":{\"USD\":1.2406},\"USD\":{\"EUR\":0.811}}},\"includewinners\":true,\"includebidderkeys\":true},\"cache\":{\"bids\":{},\"vastxml\":{\"ttlseconds\":120}},\"auctiontimestamp\":1000}}}", "responsebody": "{\"id\":\"tid\",\"seatbid\":[{\"bid\":[{\"id\":\"bid001\",\"impid\":\"impId001\",\"price\":7.77,\"adid\":\"adid001\",\"crid\":\"crid001\",\"cid\":\"cid001\",\"adm\":\"adm001\",\"h\":250,\"w\":300}],\"seat\":\"datablocks\"}]}", "status": 200 } @@ -225,7 +225,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } @@ -234,6 +235,7 @@ "datablocks": "{{ datablocks.response_time_ms }}", "cache": "{{ cache.response_time_ms }}" }, + "auctiontimestamp": 1000, "tmaxrequest": 5000 } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/datablocks/test-cache-datablocks-request.json b/src/test/resources/org/prebid/server/it/openrtb2/datablocks/test-cache-datablocks-request.json index edbb38a853c..7d537195aac 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/datablocks/test-cache-datablocks-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/datablocks/test-cache-datablocks-request.json @@ -12,7 +12,7 @@ "crid": "crid001", "w": 300, "h": 250, - "wurl": "http://localhost:8000/event?t=win&b=bid001&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=bid001&a=publisherId&ts=1000&bidder=datablocks&f=i" } }, { @@ -28,7 +28,7 @@ "crid": "crid002", "w": 300, "h": 250, - "wurl": "http://localhost:8000/event?t=win&b=bid002&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=bid002&a=publisherId&ts=1000&bidder=datablocks&f=i" } }, { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/datablocks/test-datablocks-bid-request-1.json b/src/test/resources/org/prebid/server/it/openrtb2/datablocks/test-datablocks-bid-request-1.json index dea5da65203..574a66545f4 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/datablocks/test-datablocks-bid-request-1.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/datablocks/test-datablocks-bid-request-1.json @@ -93,7 +93,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } \ No newline at end of file diff --git a/src/test/resources/org/prebid/server/it/openrtb2/datablocks/test-datablocks-bid-request-2.json b/src/test/resources/org/prebid/server/it/openrtb2/datablocks/test-datablocks-bid-request-2.json index 2f24cd97b0b..40a2b4d9625 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/datablocks/test-datablocks-bid-request-2.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/datablocks/test-datablocks-bid-request-2.json @@ -93,7 +93,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } \ No newline at end of file diff --git a/src/test/resources/org/prebid/server/it/openrtb2/emxdigital/test-auction-emxdigital-request.json b/src/test/resources/org/prebid/server/it/openrtb2/emxdigital/test-auction-emxdigital-request.json index 8ac584a9f4c..6fdbedaa919 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/emxdigital/test-auction-emxdigital-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/emxdigital/test-auction-emxdigital-request.json @@ -77,7 +77,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } }, "user": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/emxdigital/test-auction-emxdigital-response.json b/src/test/resources/org/prebid/server/it/openrtb2/emxdigital/test-auction-emxdigital-response.json index becd9920f4b..42556532f05 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/emxdigital/test-auction-emxdigital-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/emxdigital/test-auction-emxdigital-response.json @@ -50,7 +50,7 @@ "emx_digital": [ { "uri": "{{ emx_digital.exchange_uri }}?t=1000&ts=2060541160", - "requestbody": "{\"id\":\"tid\",\"imp\":[{\"id\":\"uuid\",\"banner\":{\"format\":[],\"w\":300,\"h\":250},\"tagid\":\"25251\",\"secure\":0}],\"site\":{\"domain\":\"example.com\",\"page\":\"http://www.example.com\",\"publisher\":{\"id\":\"publisherId\"},\"ext\":{\"amp\":0}},\"device\":{\"ua\":\"Android Chrome/60\",\"dnt\":2,\"ip\":\"127.0.0.1\",\"pxratio\":4.2,\"language\":\"en\",\"ifa\":\"ifaId\"},\"user\":{\"ext\":{\"digitrust\":{\"id\":\"id\",\"keyv\":123,\"pref\":0},\"consent\":\"consentValue\"}},\"at\":1,\"tmax\":5000,\"cur\":[\"USD\"],\"source\":{\"fd\":1,\"tid\":\"tid\"},\"regs\":{\"ext\":{\"gdpr\":0}},\"ext\":{\"prebid\":{\"debug\":1,\"aliases\":{\"appnexusAlias\":\"appnexus\",\"conversantAlias\":\"conversant\"},\"targeting\":{\"pricegranularity\":{\"precision\":2,\"ranges\":[{\"max\":20,\"increment\":0.1}]},\"currency\":{\"rates\":{\"EUR\":{\"USD\":1.2406},\"USD\":{\"EUR\":0.811}}},\"includewinners\":true,\"includebidderkeys\":true},\"cache\":{\"bids\":{},\"vastxml\":{\"ttlseconds\":120}}}}}", + "requestbody": "{\"id\":\"tid\",\"imp\":[{\"id\":\"uuid\",\"banner\":{\"format\":[],\"w\":300,\"h\":250},\"tagid\":\"25251\",\"secure\":0}],\"site\":{\"domain\":\"example.com\",\"page\":\"http://www.example.com\",\"publisher\":{\"id\":\"publisherId\"},\"ext\":{\"amp\":0}},\"device\":{\"ua\":\"Android Chrome/60\",\"dnt\":2,\"ip\":\"127.0.0.1\",\"pxratio\":4.2,\"language\":\"en\",\"ifa\":\"ifaId\"},\"user\":{\"ext\":{\"digitrust\":{\"id\":\"id\",\"keyv\":123,\"pref\":0},\"consent\":\"consentValue\"}},\"at\":1,\"tmax\":5000,\"cur\":[\"USD\"],\"source\":{\"fd\":1,\"tid\":\"tid\"},\"regs\":{\"ext\":{\"gdpr\":0}},\"ext\":{\"prebid\":{\"debug\":1,\"aliases\":{\"appnexusAlias\":\"appnexus\",\"conversantAlias\":\"conversant\"},\"targeting\":{\"pricegranularity\":{\"precision\":2,\"ranges\":[{\"max\":20,\"increment\":0.1}]},\"currency\":{\"rates\":{\"EUR\":{\"USD\":1.2406},\"USD\":{\"EUR\":0.811}}},\"includewinners\":true,\"includebidderkeys\":true},\"cache\":{\"bids\":{},\"vastxml\":{\"ttlseconds\":120}},\"auctiontimestamp\":1000}}}", "responsebody": "{\"id\":\"some_test_auction\",\"seatbid\":[{\"seat\":\"12356\",\"bid\":[{\"id\":\"uuid\",\"adm\":\"
\",\"impid\":\"uuid\",\"ttl\":300,\"crid\":\"94395500\",\"w\":300,\"price\":2.942808,\"adid\":\"94395500\",\"h\":250}]}],\"cur\":\"USD\"}", "status": 200 } @@ -58,7 +58,7 @@ "cache": [ { "uri": "{{ cache.endpoint }}", - "requestbody": "{\"puts\":[{\"type\":\"json\",\"value\":{\"id\":\"uuid\",\"impid\":\"uuid\",\"price\":2.942808,\"adm\":\"
\",\"adid\":\"94395500\",\"crid\":\"94395500\",\"w\":300,\"h\":250,\"wurl\":\"http://localhost:8000/event?t=win&b=uuid&a=publisherId&f=i\"}}]}", + "requestbody": "{\"puts\":[{\"type\":\"json\",\"value\":{\"id\":\"uuid\",\"impid\":\"uuid\",\"price\":2.942808,\"adm\":\"
\",\"adid\":\"94395500\",\"crid\":\"94395500\",\"w\":300,\"h\":250,\"wurl\":\"http://localhost:8000/event?t=win&b=uuid&a=publisherId&ts=1000&bidder=emx_digital&f=i\"}}]}", "responsebody": "{\"responses\":[{\"uuid\":\"9a5d11a7-de5a-4ce4-8e89-d37f18a10045\"}]}", "status": 200 } @@ -161,7 +161,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } @@ -170,6 +171,7 @@ "cache": "{{ cache.response_time_ms }}", "emx_digital": "{{ emx_digital.response_time_ms }}" }, + "auctiontimestamp": 1000, "tmaxrequest": 5000 } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/emxdigital/test-cache-emxdigital-request.json b/src/test/resources/org/prebid/server/it/openrtb2/emxdigital/test-cache-emxdigital-request.json index 91e7c94bc32..136e0bbe3fe 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/emxdigital/test-cache-emxdigital-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/emxdigital/test-cache-emxdigital-request.json @@ -11,7 +11,7 @@ "crid": "94395500", "adid": "94395500", "h": 250, - "wurl": "http://localhost:8000/event?t=win&b=uuid&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=uuid&a=publisherId&ts=1000&bidder=emx_digital&f=i" } } ] diff --git a/src/test/resources/org/prebid/server/it/openrtb2/emxdigital/test-emxdigital-bid-request.json b/src/test/resources/org/prebid/server/it/openrtb2/emxdigital/test-emxdigital-bid-request.json index d541dfb98e9..5d1af9d2ec0 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/emxdigital/test-emxdigital-bid-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/emxdigital/test-emxdigital-bid-request.json @@ -89,7 +89,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/engagebdr/test-auction-engagebdr-request.json b/src/test/resources/org/prebid/server/it/openrtb2/engagebdr/test-auction-engagebdr-request.json index 04ed250b7c0..49c2ff8f188 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/engagebdr/test-auction-engagebdr-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/engagebdr/test-auction-engagebdr-request.json @@ -78,7 +78,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } }, "user": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/engagebdr/test-auction-engagebdr-response.json b/src/test/resources/org/prebid/server/it/openrtb2/engagebdr/test-auction-engagebdr-response.json index f7f39c65257..37475b32dbe 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/engagebdr/test-auction-engagebdr-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/engagebdr/test-auction-engagebdr-response.json @@ -100,6 +100,7 @@ "cache": "{{ cache.response_time_ms }}", "engagebdr": "{{ engagebdr.response_time_ms }}" }, + "auctiontimestamp": 1000, "tmaxrequest": 5000 } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/engagebdr/test-cache-engagebdr-request.json b/src/test/resources/org/prebid/server/it/openrtb2/engagebdr/test-cache-engagebdr-request.json index 2c8e6b53fd7..a9803b29457 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/engagebdr/test-cache-engagebdr-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/engagebdr/test-cache-engagebdr-request.json @@ -16,7 +16,7 @@ "crid": "abcde-12345", "w": 300, "h": 250, - "wurl": "http://localhost:8000/event?t=win&b=test-imp-id&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=test-imp-id&a=publisherId&ts=1000&bidder=engagebdr&f=i" } }, { @@ -35,7 +35,7 @@ "crid": "abcde-12345", "w": 300, "h": 250, - "wurl": "http://localhost:8000/event?t=win&b=test-imp-id&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=test-imp-id&a=publisherId&ts=1000&bidder=engagebdr&f=i" } }, { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/engagebdr/test-engagebdr-bid-request-1.json b/src/test/resources/org/prebid/server/it/openrtb2/engagebdr/test-engagebdr-bid-request-1.json index 10cf3d1a641..ae1597765eb 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/engagebdr/test-engagebdr-bid-request-1.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/engagebdr/test-engagebdr-bid-request-1.json @@ -87,7 +87,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/engagebdr/test-engagebdr-bid-request-2.json b/src/test/resources/org/prebid/server/it/openrtb2/engagebdr/test-engagebdr-bid-request-2.json index 44bce93e7c4..07e85229965 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/engagebdr/test-engagebdr-bid-request-2.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/engagebdr/test-engagebdr-bid-request-2.json @@ -91,7 +91,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/eplanning/test-auction-eplanning-request.json b/src/test/resources/org/prebid/server/it/openrtb2/eplanning/test-auction-eplanning-request.json index 6b5af7932bc..f0b252855c8 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/eplanning/test-auction-eplanning-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/eplanning/test-auction-eplanning-request.json @@ -67,7 +67,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } }, "user": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/eplanning/test-auction-eplanning-response.json b/src/test/resources/org/prebid/server/it/openrtb2/eplanning/test-auction-eplanning-response.json index 6fb9596d21c..25de0505ce2 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/eplanning/test-auction-eplanning-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/eplanning/test-auction-eplanning-response.json @@ -49,6 +49,7 @@ "eplanning": "{{ eplanning.response_time_ms }}", "cache": "{{ cache.response_time_ms }}" }, + "auctiontimestamp": 1000, "tmaxrequest": 5000 } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/eplanning/test-cache-eplanning-request.json b/src/test/resources/org/prebid/server/it/openrtb2/eplanning/test-cache-eplanning-request.json index 471fba1e122..1f816fcba10 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/eplanning/test-cache-eplanning-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/eplanning/test-cache-eplanning-request.json @@ -11,7 +11,7 @@ "crid": "abcdef123456789", "w": 600, "h": 300, - "wurl": "http://localhost:8000/event?t=win&b=123456789abcdef&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=123456789abcdef&a=publisherId&ts=1000&bidder=eplanning&f=i" } } ] diff --git a/src/test/resources/org/prebid/server/it/openrtb2/facebook/test-auction-facebook-request.json b/src/test/resources/org/prebid/server/it/openrtb2/facebook/test-auction-facebook-request.json index 19532f8ce94..48c6c81da18 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/facebook/test-auction-facebook-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/facebook/test-auction-facebook-request.json @@ -98,7 +98,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } }, "user": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/facebook/test-auction-facebook-response.json b/src/test/resources/org/prebid/server/it/openrtb2/facebook/test-auction-facebook-response.json index daab3fd8a95..f666ad3741e 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/facebook/test-auction-facebook-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/facebook/test-auction-facebook-response.json @@ -119,6 +119,7 @@ "audienceNetwork": "{{ audienceNetwork.response_time_ms }}", "cache": "{{ cache.response_time_ms }}" }, + "auctiontimestamp": 1000, "tmaxrequest": 5000 } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/facebook/test-cache-facebook-request.json b/src/test/resources/org/prebid/server/it/openrtb2/facebook/test-cache-facebook-request.json index 0c0a8711ce0..33175d15dfe 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/facebook/test-cache-facebook-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/facebook/test-cache-facebook-request.json @@ -11,7 +11,7 @@ "crid": "10", "w": 0, "h": 0, - "wurl": "http://localhost:8000/event?t=win&b=bid2&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=bid2&a=publisherId&ts=1000&bidder=audienceNetwork&f=i" } }, { @@ -25,7 +25,7 @@ "crid": "10", "w": 0, "h": 0, - "wurl": "http://localhost:8000/event?t=win&b=bid3&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=bid3&a=publisherId&ts=1000&bidder=audienceNetwork&f=i" } }, { @@ -39,7 +39,7 @@ "crid": "10", "w": 0, "h": 50, - "wurl": "http://localhost:8000/event?t=win&b=bid1&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=bid1&a=publisherId&ts=1000&bidder=audienceNetwork&f=i" } }, { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/gamma/test-auction-gamma-request.json b/src/test/resources/org/prebid/server/it/openrtb2/gamma/test-auction-gamma-request.json index cfafae135d8..3b56e315bc4 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/gamma/test-auction-gamma-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/gamma/test-auction-gamma-request.json @@ -73,7 +73,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } }, "user": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/gamma/test-auction-gamma-response.json b/src/test/resources/org/prebid/server/it/openrtb2/gamma/test-auction-gamma-response.json index e75fc442a51..41ecdd29405 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/gamma/test-auction-gamma-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/gamma/test-auction-gamma-response.json @@ -53,6 +53,7 @@ "gamma": "{{ gamma.response_time_ms }}", "cache": "{{ cache.response_time_ms }}" }, + "auctiontimestamp": 1000, "tmaxrequest": 5000 } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/gamma/test-cache-gamma-request.json b/src/test/resources/org/prebid/server/it/openrtb2/gamma/test-cache-gamma-request.json index 437e3692562..4518233db7a 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/gamma/test-cache-gamma-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/gamma/test-cache-gamma-request.json @@ -15,7 +15,7 @@ "crid": "29681110", "h": 250, "w": 300, - "wurl": "http://localhost:8000/event?t=win&b=7706636740145184841&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=7706636740145184841&a=publisherId&ts=1000&bidder=gamma&f=i" } } ] diff --git a/src/test/resources/org/prebid/server/it/openrtb2/gamoshi/test-auction-gamoshi-request.json b/src/test/resources/org/prebid/server/it/openrtb2/gamoshi/test-auction-gamoshi-request.json index 26b8347fad5..e840d319b73 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/gamoshi/test-auction-gamoshi-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/gamoshi/test-auction-gamoshi-request.json @@ -85,7 +85,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } }, "user": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/gamoshi/test-auction-gamoshi-response.json b/src/test/resources/org/prebid/server/it/openrtb2/gamoshi/test-auction-gamoshi-response.json index 779b96d42ba..b9c3efcbe06 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/gamoshi/test-auction-gamoshi-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/gamoshi/test-auction-gamoshi-response.json @@ -92,6 +92,7 @@ "gamoshi": "{{ gamoshi.response_time_ms }}", "cache": "{{ cache.response_time_ms }}" }, + "auctiontimestamp": 1000, "tmaxrequest": 5000 } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/gamoshi/test-cache-gamoshi-request.json b/src/test/resources/org/prebid/server/it/openrtb2/gamoshi/test-cache-gamoshi-request.json index 3ffc9cad48a..fb64bf682f1 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/gamoshi/test-cache-gamoshi-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/gamoshi/test-cache-gamoshi-request.json @@ -12,7 +12,7 @@ "crid": "crid001", "w": 300, "h": 250, - "wurl": "http://localhost:8000/event?t=win&b=bid001&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=bid001&a=publisherId&ts=1000&bidder=gamoshi&f=i" } }, { @@ -27,7 +27,7 @@ "crid": "crid002", "w": 1024, "h": 576, - "wurl": "http://localhost:8000/event?t=win&b=bid002&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=bid002&a=publisherId&ts=1000&bidder=gamoshi&f=i" } }, { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/gamoshi/test-gamoshi-bid-request-1.json b/src/test/resources/org/prebid/server/it/openrtb2/gamoshi/test-gamoshi-bid-request-1.json index cdf604599c6..fbdccdb40c9 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/gamoshi/test-gamoshi-bid-request-1.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/gamoshi/test-gamoshi-bid-request-1.json @@ -112,7 +112,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } \ No newline at end of file diff --git a/src/test/resources/org/prebid/server/it/openrtb2/grid/test-auction-grid-request.json b/src/test/resources/org/prebid/server/it/openrtb2/grid/test-auction-grid-request.json index 5627562b147..23a2080b378 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/grid/test-auction-grid-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/grid/test-auction-grid-request.json @@ -64,7 +64,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } }, "user": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/grid/test-auction-grid-response.json b/src/test/resources/org/prebid/server/it/openrtb2/grid/test-auction-grid-response.json index a9a5f1a8c6b..d36f0682972 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/grid/test-auction-grid-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/grid/test-auction-grid-response.json @@ -50,6 +50,7 @@ "grid": "{{ grid.response_time_ms }}", "cache": "{{ cache.response_time_ms }}" }, + "auctiontimestamp": 1000, "tmaxrequest": 5000 } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/grid/test-cache-grid-request.json b/src/test/resources/org/prebid/server/it/openrtb2/grid/test-cache-grid-request.json index b71e587c811..0fcf2e8d1bb 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/grid/test-cache-grid-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/grid/test-cache-grid-request.json @@ -12,7 +12,7 @@ "crid": "crid001", "w": 300, "h": 250, - "wurl": "http://localhost:8000/event?t=win&b=bid001&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=bid001&a=publisherId&ts=1000&bidder=grid&f=i" } } ] diff --git a/src/test/resources/org/prebid/server/it/openrtb2/grid/test-grid-bid-request-1.json b/src/test/resources/org/prebid/server/it/openrtb2/grid/test-grid-bid-request-1.json index fd360c5fcb9..bbeb0e3291d 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/grid/test-grid-bid-request-1.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/grid/test-grid-bid-request-1.json @@ -89,7 +89,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } \ No newline at end of file diff --git a/src/test/resources/org/prebid/server/it/openrtb2/gumgum/test-auction-gumgum-request.json b/src/test/resources/org/prebid/server/it/openrtb2/gumgum/test-auction-gumgum-request.json index 12014c428f5..635d7426931 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/gumgum/test-auction-gumgum-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/gumgum/test-auction-gumgum-request.json @@ -99,7 +99,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } }, "user": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/gumgum/test-auction-gumgum-response.json b/src/test/resources/org/prebid/server/it/openrtb2/gumgum/test-auction-gumgum-response.json index b791b3091e7..2ab0b73dfe6 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/gumgum/test-auction-gumgum-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/gumgum/test-auction-gumgum-response.json @@ -78,6 +78,7 @@ "cache": "{{ cache.response_time_ms }}", "gumgum": "{{ gumgum.response_time_ms }}" }, + "auctiontimestamp": 1000, "tmaxrequest": 5000 } } \ No newline at end of file diff --git a/src/test/resources/org/prebid/server/it/openrtb2/gumgum/test-cache-gumgum-request.json b/src/test/resources/org/prebid/server/it/openrtb2/gumgum/test-cache-gumgum-request.json index d9c861e1fbd..158803eaf8c 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/gumgum/test-cache-gumgum-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/gumgum/test-cache-gumgum-request.json @@ -10,7 +10,7 @@ "adid": "adid001", "cid": "cid001", "crid": "crid001", - "wurl": "http://localhost:8000/event?t=win&b=bid001&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=bid001&a=publisherId&ts=1000&bidder=gumgum&f=i" } }, { @@ -23,7 +23,7 @@ "adid": "adid002", "cid": "cid002", "crid": "crid002", - "wurl": "http://localhost:8000/event?t=win&b=bid002&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=bid002&a=publisherId&ts=1000&bidder=gumgum&f=i" } } ] diff --git a/src/test/resources/org/prebid/server/it/openrtb2/gumgum/test-gumgum-bid-request-1.json b/src/test/resources/org/prebid/server/it/openrtb2/gumgum/test-gumgum-bid-request-1.json index c702404359a..742d3b40f71 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/gumgum/test-gumgum-bid-request-1.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/gumgum/test-gumgum-bid-request-1.json @@ -111,7 +111,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } \ No newline at end of file diff --git a/src/test/resources/org/prebid/server/it/openrtb2/improvedigital/test-auction-improvedigital-request.json b/src/test/resources/org/prebid/server/it/openrtb2/improvedigital/test-auction-improvedigital-request.json index 15cbf1789f8..c8eb48b2c70 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/improvedigital/test-auction-improvedigital-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/improvedigital/test-auction-improvedigital-request.json @@ -70,7 +70,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } }, "user": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/improvedigital/test-auction-improvedigital-response.json b/src/test/resources/org/prebid/server/it/openrtb2/improvedigital/test-auction-improvedigital-response.json index d2612cedb26..3fe98746b51 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/improvedigital/test-auction-improvedigital-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/improvedigital/test-auction-improvedigital-response.json @@ -50,6 +50,7 @@ "improvedigital": "{{ improvedigital.response_time_ms }}", "cache": "{{ cache.response_time_ms }}" }, + "auctiontimestamp": 1000, "tmaxrequest": 5000 } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/improvedigital/test-cache-improvedigital-request.json b/src/test/resources/org/prebid/server/it/openrtb2/improvedigital/test-cache-improvedigital-request.json index b71e587c811..4d3431b3476 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/improvedigital/test-cache-improvedigital-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/improvedigital/test-cache-improvedigital-request.json @@ -12,7 +12,7 @@ "crid": "crid001", "w": 300, "h": 250, - "wurl": "http://localhost:8000/event?t=win&b=bid001&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=bid001&a=publisherId&ts=1000&bidder=improvedigital&f=i" } } ] diff --git a/src/test/resources/org/prebid/server/it/openrtb2/improvedigital/test-improvedigital-bid-request-1.json b/src/test/resources/org/prebid/server/it/openrtb2/improvedigital/test-improvedigital-bid-request-1.json index f2a6375259c..68e91516d2f 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/improvedigital/test-improvedigital-bid-request-1.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/improvedigital/test-improvedigital-bid-request-1.json @@ -95,7 +95,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } \ No newline at end of file diff --git a/src/test/resources/org/prebid/server/it/openrtb2/ix/test-auction-ix-request.json b/src/test/resources/org/prebid/server/it/openrtb2/ix/test-auction-ix-request.json index 84872e8aa17..7bb8e460198 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/ix/test-auction-ix-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/ix/test-auction-ix-request.json @@ -72,7 +72,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } }, "user": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/ix/test-auction-ix-response.json b/src/test/resources/org/prebid/server/it/openrtb2/ix/test-auction-ix-response.json index 72cac4b247e..d2aae71f9cc 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/ix/test-auction-ix-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/ix/test-auction-ix-response.json @@ -62,6 +62,7 @@ "ix": "{{ ix.response_time_ms }}", "cache": "{{ cache.response_time_ms }}" }, + "auctiontimestamp": 1000, "tmaxrequest": 5000 } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/ix/test-cache-ix-request.json b/src/test/resources/org/prebid/server/it/openrtb2/ix/test-cache-ix-request.json index daf370889df..e376e4b9512 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/ix/test-cache-ix-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/ix/test-cache-ix-request.json @@ -10,7 +10,7 @@ "crid": "crid6", "w": 300, "h": 600, - "wurl": "http://localhost:8000/event?t=win&b=975135373&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=975135373&a=publisherId&ts=1000&bidder=ix&f=i" } }, { @@ -23,7 +23,7 @@ "crid": "crid6", "w": 600, "h": 480, - "wurl": "http://localhost:8000/event?t=win&b=894859517&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=894859517&a=publisherId&ts=1000&bidder=ix&f=i" } } ] diff --git a/src/test/resources/org/prebid/server/it/openrtb2/ix/test-ix-bid-request-1.json b/src/test/resources/org/prebid/server/it/openrtb2/ix/test-ix-bid-request-1.json index 3bdd3b6cc15..8b88130120c 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/ix/test-ix-bid-request-1.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/ix/test-ix-bid-request-1.json @@ -94,7 +94,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } \ No newline at end of file diff --git a/src/test/resources/org/prebid/server/it/openrtb2/ix/test-ix-bid-request-2.json b/src/test/resources/org/prebid/server/it/openrtb2/ix/test-ix-bid-request-2.json index 7238eca1baf..ca8ee71cc5a 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/ix/test-ix-bid-request-2.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/ix/test-ix-bid-request-2.json @@ -94,7 +94,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } \ No newline at end of file diff --git a/src/test/resources/org/prebid/server/it/openrtb2/kubient/test-auction-kubient-request.json b/src/test/resources/org/prebid/server/it/openrtb2/kubient/test-auction-kubient-request.json index 903b73d5a5b..2db1f12b519 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/kubient/test-auction-kubient-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/kubient/test-auction-kubient-request.json @@ -72,7 +72,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } }, "user": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/kubient/test-auction-kubient-response.json b/src/test/resources/org/prebid/server/it/openrtb2/kubient/test-auction-kubient-response.json index 83c25e291d3..171ace1746d 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/kubient/test-auction-kubient-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/kubient/test-auction-kubient-response.json @@ -54,7 +54,7 @@ "cache": [ { "uri": "{{ cache.endpoint }}", - "requestbody": "{\"puts\":[{\"type\":\"json\",\"value\":{\"id\":\"7706636740145184841\",\"impid\":\"test-imp-banner-id\",\"price\":0.5,\"adm\":\"some-test-ad\",\"adid\":\"29681110\",\"adomain\":[\"advertsite.com\"],\"cid\":\"772\",\"crid\":\"29681110\",\"w\":1024,\"h\":576,\"wurl\":\"http://localhost:8000/event?t=win&b=7706636740145184841&a=publisherId&f=i\"}}]}", + "requestbody": "{\"puts\":[{\"type\":\"json\",\"value\":{\"id\":\"7706636740145184841\",\"impid\":\"test-imp-banner-id\",\"price\":0.5,\"adm\":\"some-test-ad\",\"adid\":\"29681110\",\"adomain\":[\"advertsite.com\"],\"cid\":\"772\",\"crid\":\"29681110\",\"w\":1024,\"h\":576,\"wurl\":\"http://localhost:8000/event?t=win&b=7706636740145184841&a=publisherId&ts=1000&bidder=kubient&f=i\"}}]}", "responsebody": "{\"responses\":[{\"uuid\":\"78f9a6dd-d08c-4b80-ba0f-0159b9add9bf\"}]}", "status": 200 } @@ -62,7 +62,7 @@ "kubient": [ { "uri": "{{ kubient.exchange_uri }}", - "requestbody": "{\"id\":\"tid\",\"imp\":[{\"id\":\"test-imp-banner-id\",\"banner\":{\"format\":[{\"w\":300,\"h\":250}],\"w\":500,\"h\":400},\"ext\":{\"bidder\":{}}}],\"site\":{\"domain\":\"example.com\",\"page\":\"http://www.example.com\",\"publisher\":{\"id\":\"publisherId\"},\"ext\":{\"amp\":0}},\"device\":{\"ua\":\"userAgent\",\"dnt\":2,\"ip\":\"193.168.244.1\",\"pxratio\":4.2,\"language\":\"en\",\"ifa\":\"ifaId\"},\"user\":{\"ext\":{\"consent\":\"consentValue\",\"digitrust\":{\"id\":\"id\",\"keyv\":123,\"pref\":0}}},\"at\":1,\"tmax\":5000,\"cur\":[\"USD\"],\"source\":{\"fd\":1,\"tid\":\"tid\"},\"regs\":{\"ext\":{\"gdpr\":0}},\"ext\":{\"prebid\":{\"debug\":1,\"aliases\":{\"appnexusAlias\":\"appnexus\",\"conversantAlias\":\"conversant\"},\"targeting\":{\"pricegranularity\":{\"precision\":2,\"ranges\":[{\"max\":20,\"increment\":0.1}]},\"currency\":{\"rates\":{\"EUR\":{\"USD\":1.2406},\"USD\":{\"EUR\":0.811}}},\"includewinners\":true,\"includebidderkeys\":true},\"cache\":{\"bids\":{},\"vastxml\":{\"ttlseconds\":120}}}}}", + "requestbody": "{\"id\":\"tid\",\"imp\":[{\"id\":\"test-imp-banner-id\",\"banner\":{\"format\":[{\"w\":300,\"h\":250}],\"w\":500,\"h\":400},\"ext\":{\"bidder\":{}}}],\"site\":{\"domain\":\"example.com\",\"page\":\"http://www.example.com\",\"publisher\":{\"id\":\"publisherId\"},\"ext\":{\"amp\":0}},\"device\":{\"ua\":\"userAgent\",\"dnt\":2,\"ip\":\"193.168.244.1\",\"pxratio\":4.2,\"language\":\"en\",\"ifa\":\"ifaId\"},\"user\":{\"ext\":{\"consent\":\"consentValue\",\"digitrust\":{\"id\":\"id\",\"keyv\":123,\"pref\":0}}},\"at\":1,\"tmax\":5000,\"cur\":[\"USD\"],\"source\":{\"fd\":1,\"tid\":\"tid\"},\"regs\":{\"ext\":{\"gdpr\":0}},\"ext\":{\"prebid\":{\"debug\":1,\"aliases\":{\"appnexusAlias\":\"appnexus\",\"conversantAlias\":\"conversant\"},\"targeting\":{\"pricegranularity\":{\"precision\":2,\"ranges\":[{\"max\":20,\"increment\":0.1}]},\"currency\":{\"rates\":{\"EUR\":{\"USD\":1.2406},\"USD\":{\"EUR\":0.811}}},\"includewinners\":true,\"includebidderkeys\":true},\"cache\":{\"bids\":{},\"vastxml\":{\"ttlseconds\":120}},\"auctiontimestamp\":1000}}}", "responsebody": "{\"id\":\"tid\",\"seatbid\":[{\"bid\":[{\"id\":\"7706636740145184841\",\"impid\":\"test-imp-banner-id\",\"price\":0.5,\"adid\":\"29681110\",\"adm\":\"some-test-ad\",\"adomain\":[\"advertsite.com\"],\"cid\":\"772\",\"crid\":\"29681110\",\"h\":576,\"w\":1024}]}]}", "status": 200 } @@ -166,7 +166,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } @@ -175,6 +176,7 @@ "cache": "{{ cache.response_time_ms }}", "kubient": "{{ kubient.response_time_ms }}" }, + "auctiontimestamp": 1000, "tmaxrequest": 5000 } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/kubient/test-cache-kubient-request.json b/src/test/resources/org/prebid/server/it/openrtb2/kubient/test-cache-kubient-request.json index 01e950062f7..2da86ac98f2 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/kubient/test-cache-kubient-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/kubient/test-cache-kubient-request.json @@ -13,7 +13,7 @@ "crid": "29681110", "h": 576, "w": 1024, - "wurl": "http://localhost:8000/event?t=win&b=7706636740145184841&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=7706636740145184841&a=publisherId&ts=1000&bidder=kubient&f=i" } } ] diff --git a/src/test/resources/org/prebid/server/it/openrtb2/kubient/test-kubient-bid-request-1.json b/src/test/resources/org/prebid/server/it/openrtb2/kubient/test-kubient-bid-request-1.json index b8f8e984914..eb432df359b 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/kubient/test-kubient-bid-request-1.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/kubient/test-kubient-bid-request-1.json @@ -96,7 +96,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/lifestreet/test-auction-lifestreet-request.json b/src/test/resources/org/prebid/server/it/openrtb2/lifestreet/test-auction-lifestreet-request.json index de15646c950..01747c5a78c 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/lifestreet/test-auction-lifestreet-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/lifestreet/test-auction-lifestreet-request.json @@ -83,7 +83,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } }, "user": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/lifestreet/test-auction-lifestreet-response.json b/src/test/resources/org/prebid/server/it/openrtb2/lifestreet/test-auction-lifestreet-response.json index 06f3da55006..5593d5682a5 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/lifestreet/test-auction-lifestreet-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/lifestreet/test-auction-lifestreet-response.json @@ -88,6 +88,7 @@ "lifestreet": "{{ lifestreet.response_time_ms }}", "cache": "{{ cache.response_time_ms }}" }, + "auctiontimestamp": 1000, "tmaxrequest": 5000 } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/lifestreet/test-cache-lifestreet-request.json b/src/test/resources/org/prebid/server/it/openrtb2/lifestreet/test-cache-lifestreet-request.json index 0d68b48df07..fc969aa4bcb 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/lifestreet/test-cache-lifestreet-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/lifestreet/test-cache-lifestreet-request.json @@ -10,7 +10,7 @@ "crid": "crid71", "w": 300, "h": 600, - "wurl": "http://localhost:8000/event?t=win&b=791858127&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=791858127&a=publisherId&ts=1000&bidder=lifestreet&f=i" } }, { @@ -23,7 +23,7 @@ "crid": "crid7", "w": 300, "h": 600, - "wurl": "http://localhost:8000/event?t=win&b=847761866&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=847761866&a=publisherId&ts=1000&bidder=lifestreet&f=i" } }, { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/lifestreet/test-lifestreet-bid-request-1.json b/src/test/resources/org/prebid/server/it/openrtb2/lifestreet/test-lifestreet-bid-request-1.json index d9e5d1b41b7..37d2176ff6d 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/lifestreet/test-lifestreet-bid-request-1.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/lifestreet/test-lifestreet-bid-request-1.json @@ -88,7 +88,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } \ No newline at end of file diff --git a/src/test/resources/org/prebid/server/it/openrtb2/lifestreet/test-lifestreet-bid-request-2.json b/src/test/resources/org/prebid/server/it/openrtb2/lifestreet/test-lifestreet-bid-request-2.json index f90a4e51ea6..8bf2e62b1b5 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/lifestreet/test-lifestreet-bid-request-2.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/lifestreet/test-lifestreet-bid-request-2.json @@ -91,7 +91,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } \ No newline at end of file diff --git a/src/test/resources/org/prebid/server/it/openrtb2/lockerdome/test-auction-lockerdome-request.json b/src/test/resources/org/prebid/server/it/openrtb2/lockerdome/test-auction-lockerdome-request.json index 8788337c444..dbef931b8f5 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/lockerdome/test-auction-lockerdome-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/lockerdome/test-auction-lockerdome-request.json @@ -66,7 +66,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } }, "user": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/lockerdome/test-auction-lockerdome-response.json b/src/test/resources/org/prebid/server/it/openrtb2/lockerdome/test-auction-lockerdome-response.json index b6bb33fa891..39c19fabf96 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/lockerdome/test-auction-lockerdome-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/lockerdome/test-auction-lockerdome-response.json @@ -50,6 +50,7 @@ "lockerdome": "{{ lockerdome.response_time_ms }}", "cache": "{{ cache.response_time_ms }}" }, + "auctiontimestamp": 1000, "tmaxrequest": 5000 } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/lockerdome/test-cache-lockerdome-request.json b/src/test/resources/org/prebid/server/it/openrtb2/lockerdome/test-cache-lockerdome-request.json index fd7804a8b46..766d4a4ddbc 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/lockerdome/test-cache-lockerdome-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/lockerdome/test-cache-lockerdome-request.json @@ -12,7 +12,7 @@ "crid": "crid001", "w": 300, "h": 250, - "wurl": "http://localhost:8000/event?t=win&b=bid001&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=bid001&a=publisherId&ts=1000&bidder=lockerdome&f=i" } } ] diff --git a/src/test/resources/org/prebid/server/it/openrtb2/lockerdome/test-lockerdome-bid-request.json b/src/test/resources/org/prebid/server/it/openrtb2/lockerdome/test-lockerdome-bid-request.json index ab046976812..a5400e2b8ee 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/lockerdome/test-lockerdome-bid-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/lockerdome/test-lockerdome-bid-request.json @@ -91,7 +91,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } \ No newline at end of file diff --git a/src/test/resources/org/prebid/server/it/openrtb2/marsmedia/test-auction-marsmedia-request.json b/src/test/resources/org/prebid/server/it/openrtb2/marsmedia/test-auction-marsmedia-request.json index d361fd40e24..4e245bb571e 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/marsmedia/test-auction-marsmedia-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/marsmedia/test-auction-marsmedia-request.json @@ -81,7 +81,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } }, "user": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/marsmedia/test-auction-marsmedia-response.json b/src/test/resources/org/prebid/server/it/openrtb2/marsmedia/test-auction-marsmedia-response.json index e5f8fd556c2..720d1cd1e4a 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/marsmedia/test-auction-marsmedia-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/marsmedia/test-auction-marsmedia-response.json @@ -50,6 +50,7 @@ "marsmedia": "{{ marsmedia.response_time_ms }}", "cache": "{{ cache.response_time_ms }}" }, + "auctiontimestamp": 1000, "tmaxrequest": 5000 } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/marsmedia/test-cache-marsmedia-request.json b/src/test/resources/org/prebid/server/it/openrtb2/marsmedia/test-cache-marsmedia-request.json index fd7804a8b46..6b4a4b0e1b8 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/marsmedia/test-cache-marsmedia-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/marsmedia/test-cache-marsmedia-request.json @@ -12,7 +12,7 @@ "crid": "crid001", "w": 300, "h": 250, - "wurl": "http://localhost:8000/event?t=win&b=bid001&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=bid001&a=publisherId&ts=1000&bidder=marsmedia&f=i" } } ] diff --git a/src/test/resources/org/prebid/server/it/openrtb2/marsmedia/test-marsmedia-bid-request-1.json b/src/test/resources/org/prebid/server/it/openrtb2/marsmedia/test-marsmedia-bid-request-1.json index 1c14f724ff8..c672c2bdcad 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/marsmedia/test-marsmedia-bid-request-1.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/marsmedia/test-marsmedia-bid-request-1.json @@ -108,7 +108,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } \ No newline at end of file diff --git a/src/test/resources/org/prebid/server/it/openrtb2/mgid/test-auction-mgid-request.json b/src/test/resources/org/prebid/server/it/openrtb2/mgid/test-auction-mgid-request.json index a9df6603222..b437c4ac859 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/mgid/test-auction-mgid-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/mgid/test-auction-mgid-request.json @@ -73,7 +73,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } }, "user": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/mgid/test-auction-mgid-response.json b/src/test/resources/org/prebid/server/it/openrtb2/mgid/test-auction-mgid-response.json index d971bd7d6b1..7b04c34042e 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/mgid/test-auction-mgid-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/mgid/test-auction-mgid-response.json @@ -52,6 +52,7 @@ "cache": "{{ cache.response_time_ms }}", "mgid": "{{ mgid.response_time_ms }}" }, + "auctiontimestamp": 1000, "tmaxrequest": 5000 } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/mgid/test-cache-mgid-request.json b/src/test/resources/org/prebid/server/it/openrtb2/mgid/test-cache-mgid-request.json index c1a829a2082..e76fee6d32e 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/mgid/test-cache-mgid-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/mgid/test-cache-mgid-request.json @@ -14,7 +14,7 @@ "ext": { "crtype": "banner" }, - "wurl": "http://localhost:8000/event?t=win&b=test-bid-id&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=test-bid-id&a=publisherId&ts=1000&bidder=mgid&f=i" } } ] diff --git a/src/test/resources/org/prebid/server/it/openrtb2/mgid/test-mgid-bid-request.json b/src/test/resources/org/prebid/server/it/openrtb2/mgid/test-mgid-bid-request.json index a6170f06ce4..7c9f0c91850 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/mgid/test-mgid-bid-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/mgid/test-mgid-bid-request.json @@ -101,7 +101,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/openx/test-auction-openx-request.json b/src/test/resources/org/prebid/server/it/openrtb2/openx/test-auction-openx-request.json index a4ee579e4e5..376db491d82 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/openx/test-auction-openx-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/openx/test-auction-openx-request.json @@ -139,7 +139,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } }, "user": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/openx/test-auction-openx-response.json b/src/test/resources/org/prebid/server/it/openrtb2/openx/test-auction-openx-response.json index 4f7e034bc68..4387b04f8c4 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/openx/test-auction-openx-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/openx/test-auction-openx-response.json @@ -162,6 +162,7 @@ "openx": "{{ openx.response_time_ms }}", "cache": "{{ cache.response_time_ms }}" }, + "auctiontimestamp": 1000, "tmaxrequest": 5000 } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/openx/test-cache-openx-request.json b/src/test/resources/org/prebid/server/it/openrtb2/openx/test-cache-openx-request.json index ad060b56794..0ed9eaccf83 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/openx/test-cache-openx-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/openx/test-cache-openx-request.json @@ -10,7 +10,7 @@ "crid": "crid00", "w": 300, "h": 250, - "wurl": "http://localhost:8000/event?t=win&b=600527796&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=600527796&a=publisherId&ts=1000&bidder=openx&f=i" } }, { @@ -23,7 +23,7 @@ "crid": "crid00", "w": 300, "h": 250, - "wurl": "http://localhost:8000/event?t=win&b=600527794&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=600527794&a=publisherId&ts=1000&bidder=openx&f=i" } }, { @@ -36,7 +36,7 @@ "crid": "crid00", "w": 300, "h": 250, - "wurl": "http://localhost:8000/event?t=win&b=600527795&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=600527795&a=publisherId&ts=1000&bidder=openx&f=i" } }, { @@ -49,7 +49,7 @@ "crid": "crid00", "w": 300, "h": 250, - "wurl": "http://localhost:8000/event?t=win&b=600527793&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=600527793&a=publisherId&ts=1000&bidder=openx&f=i" } }, { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/pubmatic/test-auction-pubmatic-request.json b/src/test/resources/org/prebid/server/it/openrtb2/pubmatic/test-auction-pubmatic-request.json index fdd49a9fb87..3c6f687c7c4 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/pubmatic/test-auction-pubmatic-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/pubmatic/test-auction-pubmatic-request.json @@ -107,7 +107,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } }, "user": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/pubmatic/test-auction-pubmatic-response.json b/src/test/resources/org/prebid/server/it/openrtb2/pubmatic/test-auction-pubmatic-response.json index e8bb104aa3f..c61d11fdfc1 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/pubmatic/test-auction-pubmatic-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/pubmatic/test-auction-pubmatic-response.json @@ -91,6 +91,7 @@ "pubmatic": "{{ pubmatic.response_time_ms }}", "cache": "{{ cache.response_time_ms }}" }, + "auctiontimestamp": 1000, "tmaxrequest": 5000 } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/pubmatic/test-cache-pubmatic-request.json b/src/test/resources/org/prebid/server/it/openrtb2/pubmatic/test-cache-pubmatic-request.json index 571bd0de0f9..f31d329af21 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/pubmatic/test-cache-pubmatic-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/pubmatic/test-cache-pubmatic-request.json @@ -13,7 +13,7 @@ "ext": { "BidType": 1 }, - "wurl": "http://localhost:8000/event?t=win&b=113343587&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=113343587&a=publisherId&ts=1000&bidder=pubmatic&f=i" } }, { @@ -26,7 +26,7 @@ "crid": "crid9", "w": 300, "h": 600, - "wurl": "http://localhost:8000/event?t=win&b=158758924&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=158758924&a=publisherId&ts=1000&bidder=pubmatic&f=i" } }, { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/pubnative/test-auction-pubnative-request.json b/src/test/resources/org/prebid/server/it/openrtb2/pubnative/test-auction-pubnative-request.json index a76f829f358..d140fc4ef42 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/pubnative/test-auction-pubnative-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/pubnative/test-auction-pubnative-request.json @@ -97,7 +97,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } }, "user": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/pubnative/test-auction-pubnative-response.json b/src/test/resources/org/prebid/server/it/openrtb2/pubnative/test-auction-pubnative-response.json index 428c350eb6a..87ccaaed235 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/pubnative/test-auction-pubnative-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/pubnative/test-auction-pubnative-response.json @@ -124,6 +124,7 @@ "pubnative": "{{ pubnative.response_time_ms }}", "cache": "{{ cache.response_time_ms }}" }, + "auctiontimestamp": 1000, "tmaxrequest": 5000 } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/pubnative/test-cache-pubnative-request.json b/src/test/resources/org/prebid/server/it/openrtb2/pubnative/test-cache-pubnative-request.json index 531dad59838..c3b2ea506db 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/pubnative/test-cache-pubnative-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/pubnative/test-cache-pubnative-request.json @@ -12,7 +12,7 @@ "crid": "crid001", "w": 300, "h": 250, - "wurl": "http://localhost:8000/event?t=win&b=bid001&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=bid001&a=publisherId&ts=1000&bidder=pubnative&f=i" } }, { @@ -27,7 +27,7 @@ "crid": "crid002", "w": 640, "h": 480, - "wurl": "http://localhost:8000/event?t=win&b=bid002&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=bid002&a=publisherId&ts=1000&bidder=pubnative&f=i" } }, { @@ -40,7 +40,7 @@ "adid": "adid003", "cid": "cid003", "crid": "crid003", - "wurl": "http://localhost:8000/event?t=win&b=bid003&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=bid003&a=publisherId&ts=1000&bidder=pubnative&f=i" } }, { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/pubnative/test-pubnative-bid-request-1.json b/src/test/resources/org/prebid/server/it/openrtb2/pubnative/test-pubnative-bid-request-1.json index c9e1f8bd2c5..d383e8d01ef 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/pubnative/test-pubnative-bid-request-1.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/pubnative/test-pubnative-bid-request-1.json @@ -96,7 +96,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } \ No newline at end of file diff --git a/src/test/resources/org/prebid/server/it/openrtb2/pubnative/test-pubnative-bid-request-2.json b/src/test/resources/org/prebid/server/it/openrtb2/pubnative/test-pubnative-bid-request-2.json index 25319ba8468..921d35b2332 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/pubnative/test-pubnative-bid-request-2.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/pubnative/test-pubnative-bid-request-2.json @@ -93,7 +93,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } \ No newline at end of file diff --git a/src/test/resources/org/prebid/server/it/openrtb2/pubnative/test-pubnative-bid-request-3.json b/src/test/resources/org/prebid/server/it/openrtb2/pubnative/test-pubnative-bid-request-3.json index 522bdffd3f6..b3e5de07b65 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/pubnative/test-pubnative-bid-request-3.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/pubnative/test-pubnative-bid-request-3.json @@ -90,7 +90,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } \ No newline at end of file diff --git a/src/test/resources/org/prebid/server/it/openrtb2/pulsepoint/test-auction-pulsepoint-request.json b/src/test/resources/org/prebid/server/it/openrtb2/pulsepoint/test-auction-pulsepoint-request.json index aa83df76aa3..9129d502721 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/pulsepoint/test-auction-pulsepoint-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/pulsepoint/test-auction-pulsepoint-request.json @@ -90,7 +90,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } }, "user": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/pulsepoint/test-auction-pulsepoint-response.json b/src/test/resources/org/prebid/server/it/openrtb2/pulsepoint/test-auction-pulsepoint-response.json index 8aaed2af427..c8222115353 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/pulsepoint/test-auction-pulsepoint-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/pulsepoint/test-auction-pulsepoint-response.json @@ -82,6 +82,7 @@ "pulsepoint": "{{ pulsepoint.response_time_ms }}", "cache": "{{ cache.response_time_ms }}" }, + "auctiontimestamp": 1000, "tmaxrequest": 5000 } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/pulsepoint/test-cache-pulsepoint-request.json b/src/test/resources/org/prebid/server/it/openrtb2/pulsepoint/test-cache-pulsepoint-request.json index 4ee5d81c3ed..798b25191e6 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/pulsepoint/test-cache-pulsepoint-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/pulsepoint/test-cache-pulsepoint-request.json @@ -10,7 +10,7 @@ "crid": "crid8", "w": 300, "h": 250, - "wurl": "http://localhost:8000/event?t=win&b=bidId01&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=bidId01&a=publisherId&ts=1000&bidder=pulsepoint&f=i" } }, { @@ -23,7 +23,7 @@ "crid": "crid81", "w": 120, "h": 180, - "wurl": "http://localhost:8000/event?t=win&b=bidId02&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=bidId02&a=publisherId&ts=1000&bidder=pulsepoint&f=i" } } ] diff --git a/src/test/resources/org/prebid/server/it/openrtb2/pulsepoint/test-pulsepoint-bid-request-1.json b/src/test/resources/org/prebid/server/it/openrtb2/pulsepoint/test-pulsepoint-bid-request-1.json index d0811d52546..d0f7ff94f52 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/pulsepoint/test-pulsepoint-bid-request-1.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/pulsepoint/test-pulsepoint-bid-request-1.json @@ -117,7 +117,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } \ No newline at end of file diff --git a/src/test/resources/org/prebid/server/it/openrtb2/rhythmone/test-auction-rhythmone-request.json b/src/test/resources/org/prebid/server/it/openrtb2/rhythmone/test-auction-rhythmone-request.json index 58e4ce50bc9..f445964a880 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/rhythmone/test-auction-rhythmone-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/rhythmone/test-auction-rhythmone-request.json @@ -85,7 +85,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } }, "user": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/rhythmone/test-auction-rhythmone-response.json b/src/test/resources/org/prebid/server/it/openrtb2/rhythmone/test-auction-rhythmone-response.json index 5a2e10270ee..8ecdb88704c 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/rhythmone/test-auction-rhythmone-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/rhythmone/test-auction-rhythmone-response.json @@ -62,6 +62,7 @@ "rhythmone": "{{ rhythmone.response_time_ms }}", "cache": "{{ cache.response_time_ms }}" }, + "auctiontimestamp": 1000, "tmaxrequest": 5000 } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/rhythmone/test-cache-rhythmone-request.json b/src/test/resources/org/prebid/server/it/openrtb2/rhythmone/test-cache-rhythmone-request.json index de89ef3ed74..055295fa4c2 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/rhythmone/test-cache-rhythmone-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/rhythmone/test-cache-rhythmone-request.json @@ -18,7 +18,7 @@ ], "w": 640, "h": 480, - "wurl": "http://localhost:8000/event?t=win&b=bid01&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=bid01&a=publisherId&ts=1000&bidder=rhythmone&f=i" } }, { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/rhythmone/test-rhythmone-bid-request-1.json b/src/test/resources/org/prebid/server/it/openrtb2/rhythmone/test-rhythmone-bid-request-1.json index 796afb97d16..a218348a6b2 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/rhythmone/test-rhythmone-bid-request-1.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/rhythmone/test-rhythmone-bid-request-1.json @@ -112,7 +112,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } \ No newline at end of file diff --git a/src/test/resources/org/prebid/server/it/openrtb2/rtbhouse/test-auction-rtbhouse-request.json b/src/test/resources/org/prebid/server/it/openrtb2/rtbhouse/test-auction-rtbhouse-request.json index 3ab4370e75b..d1962b2b4f6 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/rtbhouse/test-auction-rtbhouse-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/rtbhouse/test-auction-rtbhouse-request.json @@ -67,7 +67,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } }, "user": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/rtbhouse/test-auction-rtbhouse-response.json b/src/test/resources/org/prebid/server/it/openrtb2/rtbhouse/test-auction-rtbhouse-response.json index f40a0115c51..11b6a8a644f 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/rtbhouse/test-auction-rtbhouse-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/rtbhouse/test-auction-rtbhouse-response.json @@ -50,6 +50,7 @@ "rtbhouse": "{{ rtbhouse.response_time_ms }}", "cache": "{{ cache.response_time_ms }}" }, + "auctiontimestamp": 1000, "tmaxrequest": 5000 } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/rtbhouse/test-cache-rtbhouse-request.json b/src/test/resources/org/prebid/server/it/openrtb2/rtbhouse/test-cache-rtbhouse-request.json index ca1980e446d..cde677169c3 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/rtbhouse/test-cache-rtbhouse-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/rtbhouse/test-cache-rtbhouse-request.json @@ -12,7 +12,7 @@ "crid": "12345678", "w": 300, "h": 250, - "wurl": "http://localhost:8000/event?t=win&b=randomid&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=randomid&a=publisherId&ts=1000&bidder=rtbhouse&f=i" } } ] diff --git a/src/test/resources/org/prebid/server/it/openrtb2/rtbhouse/test-rtbhouse-bid-request-1.json b/src/test/resources/org/prebid/server/it/openrtb2/rtbhouse/test-rtbhouse-bid-request-1.json index 6e0991021b2..77b13bb23b8 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/rtbhouse/test-rtbhouse-bid-request-1.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/rtbhouse/test-rtbhouse-bid-request-1.json @@ -89,7 +89,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } \ No newline at end of file diff --git a/src/test/resources/org/prebid/server/it/openrtb2/rubicon_appnexus/test-appnexus-bid-request-1.json b/src/test/resources/org/prebid/server/it/openrtb2/rubicon_appnexus/test-appnexus-bid-request-1.json index c495ce1e5ad..7910ca6c93b 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/rubicon_appnexus/test-appnexus-bid-request-1.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/rubicon_appnexus/test-appnexus-bid-request-1.json @@ -159,7 +159,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/rubicon_appnexus/test-appnexus-bid-request-2.json b/src/test/resources/org/prebid/server/it/openrtb2/rubicon_appnexus/test-appnexus-bid-request-2.json index 45ef2363030..0319466cf97 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/rubicon_appnexus/test-appnexus-bid-request-2.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/rubicon_appnexus/test-appnexus-bid-request-2.json @@ -147,7 +147,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/rubicon_appnexus/test-auction-rubicon-appnexus-request.json b/src/test/resources/org/prebid/server/it/openrtb2/rubicon_appnexus/test-auction-rubicon-appnexus-request.json index 79cad0676f5..198b4cdebd3 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/rubicon_appnexus/test-auction-rubicon-appnexus-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/rubicon_appnexus/test-auction-rubicon-appnexus-request.json @@ -268,7 +268,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } }, "user": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/rubicon_appnexus/test-auction-rubicon-appnexus-response.json b/src/test/resources/org/prebid/server/it/openrtb2/rubicon_appnexus/test-auction-rubicon-appnexus-response.json index 8814bf87ca6..dee0253ed5f 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/rubicon_appnexus/test-auction-rubicon-appnexus-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/rubicon_appnexus/test-auction-rubicon-appnexus-response.json @@ -14,7 +14,7 @@ "hb_pb": "0.90", "hb_pb_appnexus": "0.90", "hb_cache_path": "/cache", - "hb_winurl": "http%3A%2F%2Flocalhost%3A8000%2Fevent%3Ft%3Dwin%26b%3DBIDID%26a%3D5001%26f%3Di", + "hb_winurl": "http%3A%2F%2Flocalhost%3A8000%2Fevent%3Ft%3Dwin%26b%3DBIDID%26a%3D5001%26ts%3D1000%26bidder%3Dappnexus%26f%3Di", "hb_cache_path_appnexus": "/cache", "hb_bidder_appnexus": "appnexus", "hb_bidder": "appnexus", @@ -32,8 +32,8 @@ } }, "events": { - "win": "http://localhost:8000/event?t=win&b=a121a07f-1579-4465-bc5e-5c5b02a0c421&a=5001&f=i", - "imp": "http://localhost:8000/event?t=imp&b=a121a07f-1579-4465-bc5e-5c5b02a0c421&a=5001&f=i" + "win": "http://localhost:8000/event?t=win&b=a121a07f-1579-4465-bc5e-5c5b02a0c421&a=5001&ts=1000&bidder=appnexus&f=i", + "imp": "http://localhost:8000/event?t=imp&b=a121a07f-1579-4465-bc5e-5c5b02a0c421&a=5001&ts=1000&bidder=appnexus&f=i" } } } @@ -58,7 +58,7 @@ "targeting": { "hb_pb": "5.50", "hb_pb_appnexus": "5.50", - "hb_winurl": "http%3A%2F%2Flocalhost%3A8000%2Fevent%3Ft%3Dwin%26b%3DBIDID%26a%3D5001%26f%3Di", + "hb_winurl": "http%3A%2F%2Flocalhost%3A8000%2Fevent%3Ft%3Dwin%26b%3DBIDID%26a%3D5001%26ts%3D1000%26bidder%3Dappnexus%26f%3Di", "hb_size": "300x250", "hb_bidder_appnexus": "appnexus", "hb_bidder": "appnexus", @@ -73,8 +73,8 @@ "hb_cache_path_appnexus": "{{ cache.path }}" }, "events": { - "win": "http://localhost:8000/event?t=win&b=7706636740145184841&a=5001&f=i", - "imp": "http://localhost:8000/event?t=imp&b=7706636740145184841&a=5001&f=i" + "win": "http://localhost:8000/event?t=win&b=7706636740145184841&a=5001&ts=1000&bidder=appnexus&f=i", + "imp": "http://localhost:8000/event?t=imp&b=7706636740145184841&a=5001&ts=1000&bidder=appnexus&f=i" }, "cache": { "bids": { @@ -119,7 +119,7 @@ "hb_bidder": "appnexus", "hb_bidid": "928185755156387460", "hb_bidid_appnexus": "928185755156387460", - "hb_winurl": "http%3A%2F%2Flocalhost%3A8000%2Fevent%3Ft%3Dwin%26b%3DBIDID%26a%3D5001%26f%3Di", + "hb_winurl": "http%3A%2F%2Flocalhost%3A8000%2Fevent%3Ft%3Dwin%26b%3DBIDID%26a%3D5001%26ts%3D1000%26bidder%3Dappnexus%26f%3Di", "hb_cache_id": "6cf69b42-96f5-4ba1-a984-a9b4d8ff21cf", "hb_cache_id_appnexus": "6cf69b42-96f5-4ba1-a984-a9b4d8ff21cf", "hb_cache_host": "{{ cache.host }}", @@ -128,8 +128,8 @@ "hb_cache_path_appnexus": "{{ cache.path }}" }, "events": { - "win": "http://localhost:8000/event?t=win&b=928185755156387460&a=5001&f=i", - "imp": "http://localhost:8000/event?t=imp&b=928185755156387460&a=5001&f=i" + "win": "http://localhost:8000/event?t=win&b=928185755156387460&a=5001&ts=1000&bidder=appnexus&f=i", + "imp": "http://localhost:8000/event?t=imp&b=928185755156387460&a=5001&ts=1000&bidder=appnexus&f=i" }, "cache": { "bids": { @@ -182,8 +182,8 @@ "hb_cache_path_appnexusAlias": "{{ cache.path }}" }, "events": { - "win": "http://localhost:8000/event?t=win&b=7706636740145184840&a=5001&f=i", - "imp": "http://localhost:8000/event?t=imp&b=7706636740145184840&a=5001&f=i" + "win": "http://localhost:8000/event?t=win&b=7706636740145184840&a=5001&ts=1000&bidder=appnexusAlias&f=i", + "imp": "http://localhost:8000/event?t=imp&b=7706636740145184840&a=5001&ts=1000&bidder=appnexusAlias&f=i" }, "cache": { "bids": { @@ -222,7 +222,7 @@ "hb_pb_rubicon": "0.80", "hb_cache_id_rubicon": "734b7948-e41d-4c14-b2c3-c31634b32376", "hb_cache_path": "/cache", - "hb_winurl": "http%3A%2F%2Flocalhost%3A8000%2Fevent%3Ft%3Dwin%26b%3DBIDID%26a%3D5001%26f%3Di", + "hb_winurl": "http%3A%2F%2Flocalhost%3A8000%2Fevent%3Ft%3Dwin%26b%3DBIDID%26a%3D5001%26ts%3D1000%26bidder%3Drubicon%26f%3Di", "hb_bidder": "rubicon", "hb_bidder_rubicon": "rubicon", "hb_bidid": "f227a07f-1579-4465-bc5e-5c5b02a0c181", @@ -239,8 +239,8 @@ } }, "events": { - "win": "http://localhost:8000/event?t=win&b=f227a07f-1579-4465-bc5e-5c5b02a0c181&a=5001&f=i", - "imp": "http://localhost:8000/event?t=imp&b=f227a07f-1579-4465-bc5e-5c5b02a0c181&a=5001&f=i" + "win": "http://localhost:8000/event?t=win&b=f227a07f-1579-4465-bc5e-5c5b02a0c181&a=5001&ts=1000&bidder=rubicon&f=i", + "imp": "http://localhost:8000/event?t=imp&b=f227a07f-1579-4465-bc5e-5c5b02a0c181&a=5001&ts=1000&bidder=rubicon&f=i" } } } @@ -266,8 +266,8 @@ } }, "events": { - "win": "http://localhost:8000/event?t=win&b=f227a07f-1579-4465-bc5e-5c5b02a0c180&a=5001&f=i", - "imp": "http://localhost:8000/event?t=imp&b=f227a07f-1579-4465-bc5e-5c5b02a0c180&a=5001&f=i" + "win": "http://localhost:8000/event?t=win&b=f227a07f-1579-4465-bc5e-5c5b02a0c180&a=5001&ts=1000&bidder=rubicon&f=i", + "imp": "http://localhost:8000/event?t=imp&b=f227a07f-1579-4465-bc5e-5c5b02a0c180&a=5001&ts=1000&bidder=rubicon&f=i" } } } @@ -300,8 +300,8 @@ "hb_cache_path_rubicon": "{{ cache.path }}" }, "events": { - "win": "http://localhost:8000/event?t=win&b=880290288&a=5001&f=i", - "imp": "http://localhost:8000/event?t=imp&b=880290288&a=5001&f=i" + "win": "http://localhost:8000/event?t=win&b=880290288&a=5001&ts=1000&bidder=rubicon&f=i", + "imp": "http://localhost:8000/event?t=imp&b=880290288&a=5001&ts=1000&bidder=rubicon&f=i" }, "cache": { "vastXml": { @@ -343,7 +343,7 @@ "hb_pb": "4.20", "hb_pb_rubicon": "4.20", "hb_cache_id_rubicon": "4fe59ef5-6fb4-48c5-88b6-9870257fc49e", - "hb_winurl": "http%3A%2F%2Flocalhost%3A8000%2Fevent%3Ft%3Dwin%26b%3DBIDID%26a%3D5001%26f%3Di", + "hb_winurl": "http%3A%2F%2Flocalhost%3A8000%2Fevent%3Ft%3Dwin%26b%3DBIDID%26a%3D5001%26ts%3D1000%26bidder%3Drubicon%26f%3Di", "hb_size": "300x600", "hb_size_rubicon": "300x600", "hb_bidder": "rubicon", @@ -357,8 +357,8 @@ "hb_cache_path_rubicon": "{{ cache.path }}" }, "events": { - "win": "http://localhost:8000/event?t=win&b=466223845&a=5001&f=i", - "imp": "http://localhost:8000/event?t=imp&b=466223845&a=5001&f=i" + "win": "http://localhost:8000/event?t=win&b=466223845&a=5001&ts=1000&bidder=rubicon&f=i", + "imp": "http://localhost:8000/event?t=imp&b=466223845&a=5001&ts=1000&bidder=rubicon&f=i" }, "cache": { "bids": { @@ -381,7 +381,7 @@ "appnexus": [ { "uri": "{{ appnexus.exchange_uri }}?member_id=103", - "requestbody": "{\"id\":\"tid\",\"imp\":[{\"id\":\"impId3\",\"banner\":{\"format\":[{\"w\":300,\"h\":250},{\"w\":300,\"h\":600}],\"w\":300,\"h\":250,\"pos\":3},\"tagid\":\"abc\",\"bidfloor\":1.0,\"ext\":{\"appnexus\":{\"keywords\":\"foo=bar,foo=baz\",\"traffic_source_code\":\"trafficSource\"}}},{\"id\":\"impId131\",\"native\":{\"request\":\"{\\\"ver\\\":\\\"1.1\\\",\\\"context\\\":1,\\\"contextsubtype\\\":11,\\\"plcmttype\\\":4,\\\"plcmtcnt\\\":1,\\\"assets\\\":[{\\\"id\\\":0,\\\"required\\\":1,\\\"title\\\":{\\\"len\\\":500}},{\\\"id\\\":1,\\\"required\\\":1,\\\"img\\\":{\\\"type\\\":3,\\\"wmin\\\":1,\\\"hmin\\\":1}},{\\\"id\\\":2,\\\"required\\\":0,\\\"data\\\":{\\\"len\\\":200}},{\\\"id\\\":3,\\\"required\\\":0,\\\"data\\\":{\\\"type\\\":2,\\\"len\\\":15000}},{\\\"id\\\":4,\\\"required\\\":0,\\\"data\\\":{\\\"len\\\":40}},{\\\"id\\\":5,\\\"required\\\":0,\\\"data\\\":{\\\"type\\\":11}}]}\",\"ver\":\"1.1\"},\"ext\":{\"appnexus\":{\"placement_id\":9880618}}}],\"site\":{\"domain\":\"example.com\",\"page\":\"http://www.example.com\",\"publisher\":{\"id\":\"5001\"},\"ext\":{\"amp\":0}},\"device\":{\"ua\":\"userAgent\",\"dnt\":2,\"ip\":\"80.215.195.0\",\"pxratio\":4.2,\"language\":\"en\",\"ext\":{\"prebid\":{\"interstitial\":{\"minwidthperc\":50,\"minheightperc\":60}}}},\"user\":{\"ext\":{\"consent\":\"consentValue\",\"digitrust\":{\"id\":\"id\",\"keyv\":123,\"pref\":0},\"eids\":[{\"source\":\"adserver.org\",\"uids\":[{\"id\":\"cd96870f-f53d-4986-a08e-cd1612fb13b0\",\"ext\":{\"rtiPartner\":\"TDID\"}}]},{\"source\":\"liveintent.com\",\"uids\":[{\"id\":\"efcf3a33-2eaf-4d6b-bf11-a411f134278c\"}],\"ext\":{\"segments\":[\"999\",\"888\"]}},{\"source\":\"pubcid\",\"id\":\"29cfaea8-a429-48fc-9537-8a19a8eb4f0d\"}]}},\"at\":1,\"tmax\":5000,\"cur\":[\"USD\"],\"source\":{\"fd\":1,\"tid\":\"tid\",\"ext\":{\"schain\":{\"ver\":\"1.0\"}}},\"regs\":{\"ext\":{\"us_privacy\":\"1YNN\"}},\"ext\":{\"prebid\":{\"debug\":1,\"aliases\":{\"appnexusAlias\":\"appnexus\"},\"targeting\":{\"pricegranularity\":{\"precision\":2,\"ranges\":[{\"max\":20,\"increment\":0.1}]},\"currency\":{\"rates\":{\"EUR\":{\"USD\":1.2406},\"USD\":{\"EUR\":0.811}}},\"includewinners\":true,\"includebidderkeys\":true},\"cache\":{\"bids\":{},\"vastxml\":{\"ttlseconds\":120}}}}}", + "requestbody": "{\"id\":\"tid\",\"imp\":[{\"id\":\"impId3\",\"banner\":{\"format\":[{\"w\":300,\"h\":250},{\"w\":300,\"h\":600}],\"w\":300,\"h\":250,\"pos\":3},\"tagid\":\"abc\",\"bidfloor\":1.0,\"ext\":{\"appnexus\":{\"keywords\":\"foo=bar,foo=baz\",\"traffic_source_code\":\"trafficSource\"}}},{\"id\":\"impId131\",\"native\":{\"request\":\"{\\\"ver\\\":\\\"1.1\\\",\\\"context\\\":1,\\\"contextsubtype\\\":11,\\\"plcmttype\\\":4,\\\"plcmtcnt\\\":1,\\\"assets\\\":[{\\\"id\\\":0,\\\"required\\\":1,\\\"title\\\":{\\\"len\\\":500}},{\\\"id\\\":1,\\\"required\\\":1,\\\"img\\\":{\\\"type\\\":3,\\\"wmin\\\":1,\\\"hmin\\\":1}},{\\\"id\\\":2,\\\"required\\\":0,\\\"data\\\":{\\\"len\\\":200}},{\\\"id\\\":3,\\\"required\\\":0,\\\"data\\\":{\\\"type\\\":2,\\\"len\\\":15000}},{\\\"id\\\":4,\\\"required\\\":0,\\\"data\\\":{\\\"len\\\":40}},{\\\"id\\\":5,\\\"required\\\":0,\\\"data\\\":{\\\"type\\\":11}}]}\",\"ver\":\"1.1\"},\"ext\":{\"appnexus\":{\"placement_id\":9880618}}}],\"site\":{\"domain\":\"example.com\",\"page\":\"http://www.example.com\",\"publisher\":{\"id\":\"5001\"},\"ext\":{\"amp\":0}},\"device\":{\"ua\":\"userAgent\",\"dnt\":2,\"ip\":\"80.215.195.0\",\"pxratio\":4.2,\"language\":\"en\",\"ext\":{\"prebid\":{\"interstitial\":{\"minwidthperc\":50,\"minheightperc\":60}}}},\"user\":{\"ext\":{\"consent\":\"consentValue\",\"digitrust\":{\"id\":\"id\",\"keyv\":123,\"pref\":0},\"eids\":[{\"source\":\"adserver.org\",\"uids\":[{\"id\":\"cd96870f-f53d-4986-a08e-cd1612fb13b0\",\"ext\":{\"rtiPartner\":\"TDID\"}}]},{\"source\":\"liveintent.com\",\"uids\":[{\"id\":\"efcf3a33-2eaf-4d6b-bf11-a411f134278c\"}],\"ext\":{\"segments\":[\"999\",\"888\"]}},{\"source\":\"pubcid\",\"id\":\"29cfaea8-a429-48fc-9537-8a19a8eb4f0d\"}]}},\"at\":1,\"tmax\":5000,\"cur\":[\"USD\"],\"source\":{\"fd\":1,\"tid\":\"tid\",\"ext\":{\"schain\":{\"ver\":\"1.0\"}}},\"regs\":{\"ext\":{\"us_privacy\":\"1YNN\"}},\"ext\":{\"prebid\":{\"debug\":1,\"aliases\":{\"appnexusAlias\":\"appnexus\"},\"targeting\":{\"pricegranularity\":{\"precision\":2,\"ranges\":[{\"max\":20,\"increment\":0.1}]},\"currency\":{\"rates\":{\"EUR\":{\"USD\":1.2406},\"USD\":{\"EUR\":0.811}}},\"includewinners\":true,\"includebidderkeys\":true},\"cache\":{\"bids\":{},\"vastxml\":{\"ttlseconds\":120}},\"auctiontimestamp\":1000}}}", "responsebody": "{\"id\":\"tid\",\"seatbid\":[{\"seat\":\"958\",\"bid\":[{\"id\":\"7706636740145184841\",\"impid\":\"impId3\",\"price\":5.5,\"adid\":\"29681110\",\"adm\":\"some-test-ad\",\"adomain\":[\"appnexus.com\"],\"iurl\":\"http://nym1-ib.adnxs.com/cr?id=29681110\",\"cid\":\"958\",\"crid\":\"29681110\",\"h\":250,\"w\":300,\"ext\":{\"appnexus\":{\"brand_id\":1,\"auction_id\":8189378542222915032,\"bidder_id\":2,\"bid_ad_type\":0,\"ranking_price\":0.0}}},{\"id\":\"928185755156387460\",\"impid\":\"impId131\",\"price\":1.0,\"adid\":\"69595837\",\"adm\":\"{\\\"assets\\\":[{\\\"id\\\":0,\\\"img\\\":{\\\"url\\\":\\\"http://vcdn.adnxs.com/p/creative-image/5e/b6/de/c3/5eb6dec3-4854-4dcd-980a-347f36ab502e.jpg\\\",\\\"w\\\":3000,\\\"h\\\":2250,\\\"ext\\\":{\\\"appnexus\\\":{\\\"prevent_crop\\\":0}}}},{\\\"id\\\":1,\\\"title\\\":{\\\"text\\\":\\\"This is an example Prebid Native creative\\\"}},{\\\"id\\\":2,\\\"data\\\":{\\\"value\\\":\\\"Prebid.org\\\"}},{\\\"id\\\":3,\\\"data\\\":{\\\"value\\\":\\\"ThisisaPrebidNativeCreative.Therearemanylikeit,butthisoneismine.\\\"}}],\\\"link\\\":{\\\"url\\\":\\\"http://nym1-ib.adnxs.com/click?AAAAAAAA8D8AAAAAAADwPwAAAAAAAAAAAAAAAAAA8D8AAAAAAADwPwhdYz3ZyNFNG3fXpZUyLXNZ0o5aAAAAACrElgC-AwAAvgMAAAIAAAC98iUEeP4QAAAAAABVU0QAVVNEAAEAAQARIAAAAAABAgQCAAAAAAEAhBaSXgAAAAA./pp=${AUCTION_PRICE}/cnd=%21OwwGAQiGmooHEL3llyEY-PxDIAQoADoRZGVmYXVsdCNOWU0yOjQwMjM./bn=75922/test=1/referrer=prebid.org/clickenc=http%3A%2F%2Fprebid.org%2Fdev-docs%2Fshow-native-ads.html\\\"},\\\"imptrackers\\\":[\\\"http://nym1-ib.adnxs.com/openrtb_win?e=wqT_3QLFBqBFAwAAAwDWAAUBCNmku9QFEIi6jeuTm_LoTRib7t2u2tLMlnMqNgkAAAECCPA_EQEHEAAA8D8ZCQkIAAAhCQkI8D8pEQkAMQkJqAAAMKqI2wQ4vgdAvgdIAlC95ZchWPj8Q2AAaJFAeJLRBIABAYoBA1VTRJIFBvBQmAEBoAEBqAEBsAEAuAECwAEEyAEC0AEJ2AEA4AEB8AEAigI7dWYoJ2EnLCAxMzc2ODYwLCAxNTE5MzA5NDAxKTt1ZigncicsIDY5NTk1ODM3Nh4A8IqSAvUBIXRETkdfUWlHbW9vSEVMM2xseUVZQUNENF9FTXdBRGdBUUFSSXZnZFFxb2piQkZnQVlMTURhQUJ3QUhnQWdBRUFpQUVBa0FFQm1BRUJvQUVCcUFFRHNBRUF1UUVwaTRpREFBRHdQOEVCS1l1SWd3QUE4RF9KQVhfelYzek1zXzBfMlFFQUFBAQMkRHdQLUFCQVBVQgEOLEFKZ0NBS0FDQUxVQwUQBEwwCQjwTE1BQ0FNZ0NBT0FDQU9nQ0FQZ0NBSUFEQVpBREFKZ0RBYWdEaHBxS0I3b0RFV1JsWm1GMWJIUWpUbGxOTWpvME1ESXqaAjkhT3d3R0FRNvgA8E4tUHhESUFRb0FEb1JaR1ZtWVhWc2RDTk9XVTB5T2pRd01qTS7YAugH4ALH0wHqAgpwcmViaWQub3Jn8gIRCgZBRFZfSUQSBzEzNzY4NjDyARQMQ1BHXwEUNDM1MDMwOTjyAhEKBUNQARPwmQgxNDg0NzIzOIADAYgDAZADAJgDFKADAaoDAMADkBzIAwDYAwDgAwDoAwD4AwOABACSBAkvb3BlbnJ0YjKYBACiBAwxNTIuMTkzLjYuNzSoBJrMI7IEDAgAEAAYACAAMAA4ALgEAMAEAMgEANIEEWRlZmF1bHQjTllNMjo0MDIz2gQCCADgBADwBL3llyGIBQGYBQCgBf____8FA1ABqgULc29tZS1yZXEtaWTABQDJBQAFARTwP9IFCQkFC2QAAADYBQHgBQHwBd4C-gUECAAQAJAGAZgGAA..&s=08b1535744639c904684afe46e3c6c0e4786089f&test=1&referrer=prebid.org&pp=${AUCTION_PRICE}\\\"],\\\"jstracker\\\":\\\"\\\"}\",\"adomain\":[\"appnexus.com\"],\"iurl\":\"http://nym1-ib.adnxs.com/cr?id=69595837\",\"cid\":\"958\",\"crid\":\"69595837\",\"ext\":{\"appnexus\":{\"brand_id\":1,\"brand_category_id\":1,\"auction_id\":5607483846416358664,\"bidder_id\":2,\"bid_ad_type\":3}}}]}],\"bidid\":\"5778926625248726496\",\"cur\":\"USD\"}", "status": 200 } @@ -389,7 +389,7 @@ "appnexusAlias": [ { "uri": "{{ appnexus.exchange_uri }}?member_id=104", - "requestbody": "{\"id\":\"tid\",\"imp\":[{\"id\":\"impId3\",\"banner\":{\"format\":[{\"w\":300,\"h\":250},{\"w\":300,\"h\":600}],\"w\":300,\"h\":250,\"pos\":1},\"tagid\":\"abc\",\"bidfloor\":1.0,\"ext\":{\"appnexus\":{\"keywords\":\"foo=barAlias,foo=bazAlias\",\"traffic_source_code\":\"trafficSourceAlias\"}}}],\"site\":{\"domain\":\"example.com\",\"page\":\"http://www.example.com\",\"publisher\":{\"id\":\"5001\"},\"ext\":{\"amp\":0}},\"device\":{\"ua\":\"userAgent\",\"dnt\":2,\"ip\":\"80.215.195.0\",\"pxratio\":4.2,\"language\":\"en\",\"ext\":{\"prebid\":{\"interstitial\":{\"minwidthperc\":50,\"minheightperc\":60}}}},\"user\":{\"ext\":{\"consent\":\"consentValue\",\"digitrust\":{\"id\":\"id\",\"keyv\":123,\"pref\":0},\"eids\":[{\"source\":\"adserver.org\",\"uids\":[{\"id\":\"cd96870f-f53d-4986-a08e-cd1612fb13b0\",\"ext\":{\"rtiPartner\":\"TDID\"}}]},{\"source\":\"liveintent.com\",\"uids\":[{\"id\":\"efcf3a33-2eaf-4d6b-bf11-a411f134278c\"}],\"ext\":{\"segments\":[\"999\",\"888\"]}},{\"source\":\"pubcid\",\"id\":\"29cfaea8-a429-48fc-9537-8a19a8eb4f0d\"}]}},\"at\":1,\"tmax\":5000,\"cur\":[\"USD\"],\"source\":{\"fd\":1,\"tid\":\"tid\",\"ext\":{\"schain\":{\"ver\":\"1.0\"}}},\"regs\":{\"ext\":{\"us_privacy\":\"1YNN\"}},\"ext\":{\"prebid\":{\"debug\":1,\"aliases\":{\"appnexusAlias\":\"appnexus\"},\"targeting\":{\"pricegranularity\":{\"precision\":2,\"ranges\":[{\"max\":20,\"increment\":0.1}]},\"currency\":{\"rates\":{\"EUR\":{\"USD\":1.2406},\"USD\":{\"EUR\":0.811}}},\"includewinners\":true,\"includebidderkeys\":true},\"cache\":{\"bids\":{},\"vastxml\":{\"ttlseconds\":120}}}}}", + "requestbody": "{\"id\":\"tid\",\"imp\":[{\"id\":\"impId3\",\"banner\":{\"format\":[{\"w\":300,\"h\":250},{\"w\":300,\"h\":600}],\"w\":300,\"h\":250,\"pos\":1},\"tagid\":\"abc\",\"bidfloor\":1.0,\"ext\":{\"appnexus\":{\"keywords\":\"foo=barAlias,foo=bazAlias\",\"traffic_source_code\":\"trafficSourceAlias\"}}}],\"site\":{\"domain\":\"example.com\",\"page\":\"http://www.example.com\",\"publisher\":{\"id\":\"5001\"},\"ext\":{\"amp\":0}},\"device\":{\"ua\":\"userAgent\",\"dnt\":2,\"ip\":\"80.215.195.0\",\"pxratio\":4.2,\"language\":\"en\",\"ext\":{\"prebid\":{\"interstitial\":{\"minwidthperc\":50,\"minheightperc\":60}}}},\"user\":{\"ext\":{\"consent\":\"consentValue\",\"digitrust\":{\"id\":\"id\",\"keyv\":123,\"pref\":0},\"eids\":[{\"source\":\"adserver.org\",\"uids\":[{\"id\":\"cd96870f-f53d-4986-a08e-cd1612fb13b0\",\"ext\":{\"rtiPartner\":\"TDID\"}}]},{\"source\":\"liveintent.com\",\"uids\":[{\"id\":\"efcf3a33-2eaf-4d6b-bf11-a411f134278c\"}],\"ext\":{\"segments\":[\"999\",\"888\"]}},{\"source\":\"pubcid\",\"id\":\"29cfaea8-a429-48fc-9537-8a19a8eb4f0d\"}]}},\"at\":1,\"tmax\":5000,\"cur\":[\"USD\"],\"source\":{\"fd\":1,\"tid\":\"tid\",\"ext\":{\"schain\":{\"ver\":\"1.0\"}}},\"regs\":{\"ext\":{\"us_privacy\":\"1YNN\"}},\"ext\":{\"prebid\":{\"debug\":1,\"aliases\":{\"appnexusAlias\":\"appnexus\"},\"targeting\":{\"pricegranularity\":{\"precision\":2,\"ranges\":[{\"max\":20,\"increment\":0.1}]},\"currency\":{\"rates\":{\"EUR\":{\"USD\":1.2406},\"USD\":{\"EUR\":0.811}}},\"includewinners\":true,\"includebidderkeys\":true},\"cache\":{\"bids\":{},\"vastxml\":{\"ttlseconds\":120}},\"auctiontimestamp\":1000}}}", "responsebody": "{\"id\":\"tid\",\"seatbid\":[{\"seat\":\"959\",\"bid\":[{\"id\":\"7706636740145184840\",\"impid\":\"impId3\",\"price\":5.0,\"adid\":\"29681110\",\"adm\":\"some-test-ad\",\"adomain\":[\"appnexus.com\"],\"iurl\":\"http://nym1-ib.adnxs.com/cr?id=29681110\",\"cid\":\"958\",\"crid\":\"29681110\",\"h\":250,\"w\":300,\"cat\":[\"IAB20-3\"],\"ext\":{\"appnexus\":{\"brand_id\":350,\"brand_category_id\":350,\"auction_id\":8189378542222915031,\"bidder_id\":2,\"bid_ad_type\":0,\"ranking_price\":0.0}}}]}],\"bidid\":\"5778926625248726496\",\"cur\":\"USD\"}", "status": 200 } @@ -411,7 +411,7 @@ "cache": [ { "uri": "{{ cache.endpoint }}", - "requestbody": "{\"puts\":[{\"type\":\"json\",\"value\":{\"id\":\"7706636740145184840\",\"impid\":\"impId3\",\"price\":5,\"adm\":\"some-test-ad\",\"adid\":\"29681110\",\"adomain\":[\"appnexus.com\"],\"iurl\":\"http://nym1-ib.adnxs.com/cr?id=29681110\",\"cid\":\"958\",\"crid\":\"29681110\",\"cat\":[],\"w\":300,\"h\":250,\"ext\":{\"appnexus\":{\"brand_id\":350,\"brand_category_id\":350,\"auction_id\":8189378542222915031,\"bidder_id\":2,\"bid_ad_type\":0,\"ranking_price\":0.0}},\"wurl\":\"http://localhost:8000/event?t=win&b=7706636740145184840&a=5001&f=i\"}},{\"type\":\"json\",\"value\":{\"id\":\"f227a07f-1579-4465-bc5e-5c5b02a0c180\",\"impid\":\"impStoredAuctionResponse\",\"price\":0.8,\"wurl\":\"http://localhost:8000/event?t=win&b=f227a07f-1579-4465-bc5e-5c5b02a0c180&a=5001&f=i\"}},{\"type\":\"json\",\"value\":{\"id\":\"466223845\",\"impid\":\"impId2\",\"price\":4.26,\"adm\":\"adm2\",\"crid\":\"crid2\",\"w\":300,\"h\":600,\"wurl\":\"http://localhost:8000/event?t=win&b=466223845&a=5001&f=i\"}},{\"type\":\"json\",\"value\":{\"id\":\"f227a07f-1579-4465-bc5e-5c5b02a0c181\",\"impid\":\"impStoredBidResponse\",\"price\":0.8,\"wurl\":\"http://localhost:8000/event?t=win&b=f227a07f-1579-4465-bc5e-5c5b02a0c181&a=5001&f=i\"}},{\"type\":\"json\",\"value\":{\"id\":\"880290288\",\"impid\":\"impId1\",\"price\":8.43,\"adm\":\"\",\"crid\":\"crid1\",\"w\":300,\"h\":250,\"ext\":{\"rp\":{\"targeting\":[{\"key\":\"rpfl_1001\",\"values\":[\"2_tier0100\"]}]}},\"wurl\":\"http://localhost:8000/event?t=win&b=880290288&a=5001&f=i\"}},{\"type\":\"json\",\"value\":{\"id\":\"a121a07f-1579-4465-bc5e-5c5b02a0c421\",\"impid\":\"impStoredAuctionResponse\",\"price\":0.9,\"wurl\":\"http://localhost:8000/event?t=win&b=a121a07f-1579-4465-bc5e-5c5b02a0c421&a=5001&f=i\"}},{\"type\":\"json\",\"value\":{\"id\":\"928185755156387460\",\"impid\":\"impId131\",\"price\":1,\"adm\":\"{\\\"assets\\\":[{\\\"id\\\":0,\\\"img\\\":{\\\"url\\\":\\\"http://vcdn.adnxs.com/p/creative-image/5e/b6/de/c3/5eb6dec3-4854-4dcd-980a-347f36ab502e.jpg\\\",\\\"w\\\":3000,\\\"h\\\":2250,\\\"ext\\\":{\\\"appnexus\\\":{\\\"prevent_crop\\\":0}}}},{\\\"id\\\":1,\\\"title\\\":{\\\"text\\\":\\\"This is an example Prebid Native creative\\\"}},{\\\"id\\\":2,\\\"data\\\":{\\\"value\\\":\\\"Prebid.org\\\"}},{\\\"id\\\":3,\\\"data\\\":{\\\"value\\\":\\\"ThisisaPrebidNativeCreative.Therearemanylikeit,butthisoneismine.\\\"}}],\\\"link\\\":{\\\"url\\\":\\\"http://nym1-ib.adnxs.com/click?AAAAAAAA8D8AAAAAAADwPwAAAAAAAAAAAAAAAAAA8D8AAAAAAADwPwhdYz3ZyNFNG3fXpZUyLXNZ0o5aAAAAACrElgC-AwAAvgMAAAIAAAC98iUEeP4QAAAAAABVU0QAVVNEAAEAAQARIAAAAAABAgQCAAAAAAEAhBaSXgAAAAA./pp=${AUCTION_PRICE}/cnd=%21OwwGAQiGmooHEL3llyEY-PxDIAQoADoRZGVmYXVsdCNOWU0yOjQwMjM./bn=75922/test=1/referrer=prebid.org/clickenc=http%3A%2F%2Fprebid.org%2Fdev-docs%2Fshow-native-ads.html\\\"},\\\"imptrackers\\\":[\\\"http://nym1-ib.adnxs.com/openrtb_win?e=wqT_3QLFBqBFAwAAAwDWAAUBCNmku9QFEIi6jeuTm_LoTRib7t2u2tLMlnMqNgkAAAECCPA_EQEHEAAA8D8ZCQkIAAAhCQkI8D8pEQkAMQkJqAAAMKqI2wQ4vgdAvgdIAlC95ZchWPj8Q2AAaJFAeJLRBIABAYoBA1VTRJIFBvBQmAEBoAEBqAEBsAEAuAECwAEEyAEC0AEJ2AEA4AEB8AEAigI7dWYoJ2EnLCAxMzc2ODYwLCAxNTE5MzA5NDAxKTt1ZigncicsIDY5NTk1ODM3Nh4A8IqSAvUBIXRETkdfUWlHbW9vSEVMM2xseUVZQUNENF9FTXdBRGdBUUFSSXZnZFFxb2piQkZnQVlMTURhQUJ3QUhnQWdBRUFpQUVBa0FFQm1BRUJvQUVCcUFFRHNBRUF1UUVwaTRpREFBRHdQOEVCS1l1SWd3QUE4RF9KQVhfelYzek1zXzBfMlFFQUFBAQMkRHdQLUFCQVBVQgEOLEFKZ0NBS0FDQUxVQwUQBEwwCQjwTE1BQ0FNZ0NBT0FDQU9nQ0FQZ0NBSUFEQVpBREFKZ0RBYWdEaHBxS0I3b0RFV1JsWm1GMWJIUWpUbGxOTWpvME1ESXqaAjkhT3d3R0FRNvgA8E4tUHhESUFRb0FEb1JaR1ZtWVhWc2RDTk9XVTB5T2pRd01qTS7YAugH4ALH0wHqAgpwcmViaWQub3Jn8gIRCgZBRFZfSUQSBzEzNzY4NjDyARQMQ1BHXwEUNDM1MDMwOTjyAhEKBUNQARPwmQgxNDg0NzIzOIADAYgDAZADAJgDFKADAaoDAMADkBzIAwDYAwDgAwDoAwD4AwOABACSBAkvb3BlbnJ0YjKYBACiBAwxNTIuMTkzLjYuNzSoBJrMI7IEDAgAEAAYACAAMAA4ALgEAMAEAMgEANIEEWRlZmF1bHQjTllNMjo0MDIz2gQCCADgBADwBL3llyGIBQGYBQCgBf____8FA1ABqgULc29tZS1yZXEtaWTABQDJBQAFARTwP9IFCQkFC2QAAADYBQHgBQHwBd4C-gUECAAQAJAGAZgGAA..&s=08b1535744639c904684afe46e3c6c0e4786089f&test=1&referrer=prebid.org&pp=${AUCTION_PRICE}\\\"],\\\"jstracker\\\":\\\"\\\"}\",\"adid\":\"69595837\",\"adomain\":[\"appnexus.com\"],\"iurl\":\"http://nym1-ib.adnxs.com/cr?id=69595837\",\"cid\":\"958\",\"crid\":\"69595837\",\"cat\":[\"IAB20-3\"],\"ext\":{\"appnexus\":{\"brand_id\":1,\"brand_category_id\":1,\"auction_id\":5607483846416358664,\"bidder_id\":2,\"bid_ad_type\":3}},\"wurl\":\"http://localhost:8000/event?t=win&b=928185755156387460&a=5001&f=i\"}},{\"type\":\"json\",\"value\":{\"id\":\"7706636740145184841\",\"impid\":\"impId3\",\"price\":5.5,\"adm\":\"some-test-ad\",\"adid\":\"29681110\",\"adomain\":[\"appnexus.com\"],\"iurl\":\"http://nym1-ib.adnxs.com/cr?id=29681110\",\"cid\":\"958\",\"crid\":\"29681110\",\"w\":300,\"h\":250,\"ext\":{\"appnexus\":{\"brand_id\":1,\"auction_id\":8189378542222915032,\"bidder_id\":2,\"bid_ad_type\":0,\"ranking_price\":0.0}},\"wurl\":\"http://localhost:8000/event?t=win&b=7706636740145184841&a=5001&f=i\"}},{\"type\":\"xml\",\"value\":\"\",\"expiry\":120}]}", + "requestbody": "{\"puts\":[{\"type\":\"json\",\"value\":{\"id\":\"7706636740145184840\",\"impid\":\"impId3\",\"price\":5,\"adm\":\"some-test-ad\",\"adid\":\"29681110\",\"adomain\":[\"appnexus.com\"],\"iurl\":\"http://nym1-ib.adnxs.com/cr?id=29681110\",\"cid\":\"958\",\"crid\":\"29681110\",\"cat\":[],\"w\":300,\"h\":250,\"ext\":{\"appnexus\":{\"brand_id\":350,\"brand_category_id\":350,\"auction_id\":8189378542222915031,\"bidder_id\":2,\"bid_ad_type\":0,\"ranking_price\":0.0}},\"wurl\":\"http://localhost:8000/event?t=win&b=7706636740145184840&a=5001&ts=1000&bidder=appnexusAlias&f=i\"}},{\"type\":\"json\",\"value\":{\"id\":\"f227a07f-1579-4465-bc5e-5c5b02a0c180\",\"impid\":\"impStoredAuctionResponse\",\"price\":0.8,\"wurl\":\"http://localhost:8000/event?t=win&b=f227a07f-1579-4465-bc5e-5c5b02a0c180&a=5001&ts=1000&bidder=rubicon&f=i\"}},{\"type\":\"json\",\"value\":{\"id\":\"466223845\",\"impid\":\"impId2\",\"price\":4.26,\"adm\":\"adm2\",\"crid\":\"crid2\",\"w\":300,\"h\":600,\"wurl\":\"http://localhost:8000/event?t=win&b=466223845&a=5001&ts=1000&bidder=rubicon&f=i\"}},{\"type\":\"json\",\"value\":{\"id\":\"f227a07f-1579-4465-bc5e-5c5b02a0c181\",\"impid\":\"impStoredBidResponse\",\"price\":0.8,\"wurl\":\"http://localhost:8000/event?t=win&b=f227a07f-1579-4465-bc5e-5c5b02a0c181&a=5001&ts=1000&bidder=rubicon&f=i\"}},{\"type\":\"json\",\"value\":{\"id\":\"880290288\",\"impid\":\"impId1\",\"price\":8.43,\"adm\":\"\",\"crid\":\"crid1\",\"w\":300,\"h\":250,\"ext\":{\"rp\":{\"targeting\":[{\"key\":\"rpfl_1001\",\"values\":[\"2_tier0100\"]}]}},\"wurl\":\"http://localhost:8000/event?t=win&b=880290288&a=5001&ts=1000&bidder=rubicon&f=i\"}},{\"type\":\"json\",\"value\":{\"id\":\"a121a07f-1579-4465-bc5e-5c5b02a0c421\",\"impid\":\"impStoredAuctionResponse\",\"price\":0.9,\"wurl\":\"http://localhost:8000/event?t=win&b=a121a07f-1579-4465-bc5e-5c5b02a0c421&a=5001&ts=1000&bidder=appnexus&f=i\"}},{\"type\":\"json\",\"value\":{\"id\":\"928185755156387460\",\"impid\":\"impId131\",\"price\":1,\"adm\":\"{\\\"assets\\\":[{\\\"id\\\":0,\\\"img\\\":{\\\"url\\\":\\\"http://vcdn.adnxs.com/p/creative-image/5e/b6/de/c3/5eb6dec3-4854-4dcd-980a-347f36ab502e.jpg\\\",\\\"w\\\":3000,\\\"h\\\":2250,\\\"ext\\\":{\\\"appnexus\\\":{\\\"prevent_crop\\\":0}}}},{\\\"id\\\":1,\\\"title\\\":{\\\"text\\\":\\\"This is an example Prebid Native creative\\\"}},{\\\"id\\\":2,\\\"data\\\":{\\\"value\\\":\\\"Prebid.org\\\"}},{\\\"id\\\":3,\\\"data\\\":{\\\"value\\\":\\\"ThisisaPrebidNativeCreative.Therearemanylikeit,butthisoneismine.\\\"}}],\\\"link\\\":{\\\"url\\\":\\\"http://nym1-ib.adnxs.com/click?AAAAAAAA8D8AAAAAAADwPwAAAAAAAAAAAAAAAAAA8D8AAAAAAADwPwhdYz3ZyNFNG3fXpZUyLXNZ0o5aAAAAACrElgC-AwAAvgMAAAIAAAC98iUEeP4QAAAAAABVU0QAVVNEAAEAAQARIAAAAAABAgQCAAAAAAEAhBaSXgAAAAA./pp=${AUCTION_PRICE}/cnd=%21OwwGAQiGmooHEL3llyEY-PxDIAQoADoRZGVmYXVsdCNOWU0yOjQwMjM./bn=75922/test=1/referrer=prebid.org/clickenc=http%3A%2F%2Fprebid.org%2Fdev-docs%2Fshow-native-ads.html\\\"},\\\"imptrackers\\\":[\\\"http://nym1-ib.adnxs.com/openrtb_win?e=wqT_3QLFBqBFAwAAAwDWAAUBCNmku9QFEIi6jeuTm_LoTRib7t2u2tLMlnMqNgkAAAECCPA_EQEHEAAA8D8ZCQkIAAAhCQkI8D8pEQkAMQkJqAAAMKqI2wQ4vgdAvgdIAlC95ZchWPj8Q2AAaJFAeJLRBIABAYoBA1VTRJIFBvBQmAEBoAEBqAEBsAEAuAECwAEEyAEC0AEJ2AEA4AEB8AEAigI7dWYoJ2EnLCAxMzc2ODYwLCAxNTE5MzA5NDAxKTt1ZigncicsIDY5NTk1ODM3Nh4A8IqSAvUBIXRETkdfUWlHbW9vSEVMM2xseUVZQUNENF9FTXdBRGdBUUFSSXZnZFFxb2piQkZnQVlMTURhQUJ3QUhnQWdBRUFpQUVBa0FFQm1BRUJvQUVCcUFFRHNBRUF1UUVwaTRpREFBRHdQOEVCS1l1SWd3QUE4RF9KQVhfelYzek1zXzBfMlFFQUFBAQMkRHdQLUFCQVBVQgEOLEFKZ0NBS0FDQUxVQwUQBEwwCQjwTE1BQ0FNZ0NBT0FDQU9nQ0FQZ0NBSUFEQVpBREFKZ0RBYWdEaHBxS0I3b0RFV1JsWm1GMWJIUWpUbGxOTWpvME1ESXqaAjkhT3d3R0FRNvgA8E4tUHhESUFRb0FEb1JaR1ZtWVhWc2RDTk9XVTB5T2pRd01qTS7YAugH4ALH0wHqAgpwcmViaWQub3Jn8gIRCgZBRFZfSUQSBzEzNzY4NjDyARQMQ1BHXwEUNDM1MDMwOTjyAhEKBUNQARPwmQgxNDg0NzIzOIADAYgDAZADAJgDFKADAaoDAMADkBzIAwDYAwDgAwDoAwD4AwOABACSBAkvb3BlbnJ0YjKYBACiBAwxNTIuMTkzLjYuNzSoBJrMI7IEDAgAEAAYACAAMAA4ALgEAMAEAMgEANIEEWRlZmF1bHQjTllNMjo0MDIz2gQCCADgBADwBL3llyGIBQGYBQCgBf____8FA1ABqgULc29tZS1yZXEtaWTABQDJBQAFARTwP9IFCQkFC2QAAADYBQHgBQHwBd4C-gUECAAQAJAGAZgGAA..&s=08b1535744639c904684afe46e3c6c0e4786089f&test=1&referrer=prebid.org&pp=${AUCTION_PRICE}\\\"],\\\"jstracker\\\":\\\"\\\"}\",\"adid\":\"69595837\",\"adomain\":[\"appnexus.com\"],\"iurl\":\"http://nym1-ib.adnxs.com/cr?id=69595837\",\"cid\":\"958\",\"crid\":\"69595837\",\"cat\":[\"IAB20-3\"],\"ext\":{\"appnexus\":{\"brand_id\":1,\"brand_category_id\":1,\"auction_id\":5607483846416358664,\"bidder_id\":2,\"bid_ad_type\":3}},\"wurl\":\"http://localhost:8000/event?t=win&b=928185755156387460&a=5001&ts=1000&bidder=appnexus&f=i\"}},{\"type\":\"json\",\"value\":{\"id\":\"7706636740145184841\",\"impid\":\"impId3\",\"price\":5.5,\"adm\":\"some-test-ad\",\"adid\":\"29681110\",\"adomain\":[\"appnexus.com\"],\"iurl\":\"http://nym1-ib.adnxs.com/cr?id=29681110\",\"cid\":\"958\",\"crid\":\"29681110\",\"w\":300,\"h\":250,\"ext\":{\"appnexus\":{\"brand_id\":1,\"auction_id\":8189378542222915032,\"bidder_id\":2,\"bid_ad_type\":0,\"ranking_price\":0.0}},\"wurl\":\"http://localhost:8000/event?t=win&b=7706636740145184841&a=5001&ts=1000&bidder=appnexus&f=i\"}},{\"type\":\"xml\",\"value\":\"\",\"expiry\":120}]}", "responsebody": "{\"responses\":[{\"uuid\":\"91912e5b-dfa8-42bc-9c7e-df6ce0449c19\"},{\"uuid\":\"765e116a-5773-49d5-a648-0b97a9907a4e\"},{\"uuid\":\"117431c9-807a-41e1-82a7-dcd8f8875493\"},{\"uuid\":\"6cf69b42-96f5-4ba1-a984-a9b4d8ff21cf\"},{\"uuid\":\"734b7948-e41d-4c14-b2c3-c31634b32376\"},{\"uuid\":\"c75130ed-bcdd-4821-ad91-90cf835615c5\"},{\"uuid\":\"683fe79f-6df7-4971-ac70-820e0486992d\"},{\"uuid\":\"4fe59ef5-6fb4-48c5-88b6-9870257fc49e\"},{\"uuid\":\"b2528f73-96ab-42ab-8f15-fbe6ed779a26\"}]}", "status": 200 } @@ -757,7 +757,8 @@ "rubicon": { "integration": "dmbjs" } - } + }, + "auctiontimestamp": 1000 } } } @@ -776,6 +777,7 @@ "rubicon": "{{ rubicon.response_time_ms }}", "cache": "{{ cache.response_time_ms }}" }, + "auctiontimestamp": 1000, "tmaxrequest": 5000 } -} \ No newline at end of file +} diff --git a/src/test/resources/org/prebid/server/it/openrtb2/rubicon_appnexus/test-cache-matcher-rubicon-appnexus.json b/src/test/resources/org/prebid/server/it/openrtb2/rubicon_appnexus/test-cache-matcher-rubicon-appnexus.json index 89411f3c8a7..fe6680ed067 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/rubicon_appnexus/test-cache-matcher-rubicon-appnexus.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/rubicon_appnexus/test-cache-matcher-rubicon-appnexus.json @@ -3,7 +3,7 @@ "928185755156387460@1": "6cf69b42-96f5-4ba1-a984-a9b4d8ff21cf", "7706636740145184841@5.5": "117431c9-807a-41e1-82a7-dcd8f8875493", "880290288@8.43": "683fe79f-6df7-4971-ac70-820e0486992d", - "": "b2528f73-96ab-42ab-8f15-fbe6ed779a26", + "": "b2528f73-96ab-42ab-8f15-fbe6ed779a26", "7706636740145184840@5": "91912e5b-dfa8-42bc-9c7e-df6ce0449c19", "f227a07f-1579-4465-bc5e-5c5b02a0c180@0.8": "c75130ed-bcdd-4821-ad91-90cf835615c5", "a121a07f-1579-4465-bc5e-5c5b02a0c421@0.9": "765e116a-5773-49d5-a648-0b97a9907a4e", diff --git a/src/test/resources/org/prebid/server/it/openrtb2/rubicon_appnexus/test-cache-rubicon-appnexus-request.json b/src/test/resources/org/prebid/server/it/openrtb2/rubicon_appnexus/test-cache-rubicon-appnexus-request.json index 86803cb9ed0..af03838fc07 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/rubicon_appnexus/test-cache-rubicon-appnexus-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/rubicon_appnexus/test-cache-rubicon-appnexus-request.json @@ -6,7 +6,7 @@ "id": "f227a07f-1579-4465-bc5e-5c5b02a0c180", "impid": "impStoredAuctionResponse", "price": 0.8, - "wurl": "http://localhost:8000/event?t=win&b=f227a07f-1579-4465-bc5e-5c5b02a0c180&a=5001&f=i" + "wurl": "http://localhost:8000/event?t=win&b=f227a07f-1579-4465-bc5e-5c5b02a0c180&a=5001&ts=1000&bidder=rubicon&f=i" } }, { @@ -19,7 +19,7 @@ "crid": "crid2", "w": 300, "h": 600, - "wurl": "http://localhost:8000/event?t=win&b=466223845&a=5001&f=i" + "wurl": "http://localhost:8000/event?t=win&b=466223845&a=5001&ts=1000&bidder=rubicon&f=i" } }, { @@ -39,7 +39,7 @@ "cat": [], "w": 300, "h": 250, - "wurl": "http://localhost:8000/event?t=win&b=7706636740145184840&a=5001&f=i", + "wurl": "http://localhost:8000/event?t=win&b=7706636740145184840&a=5001&ts=1000&bidder=appnexusAlias&f=i", "ext": { "appnexus": { "brand_id": 350, @@ -58,7 +58,7 @@ "id": "f227a07f-1579-4465-bc5e-5c5b02a0c181", "impid": "impStoredBidResponse", "price": 0.8, - "wurl": "http://localhost:8000/event?t=win&b=f227a07f-1579-4465-bc5e-5c5b02a0c181&a=5001&f=i" + "wurl": "http://localhost:8000/event?t=win&b=f227a07f-1579-4465-bc5e-5c5b02a0c181&a=5001&ts=1000&bidder=rubicon&f=i" } }, { @@ -87,7 +87,7 @@ "bid_ad_type": 3 } }, - "wurl": "http://localhost:8000/event?t=win&b=928185755156387460&a=5001&f=i" + "wurl": "http://localhost:8000/event?t=win&b=928185755156387460&a=5001&ts=1000&bidder=appnexus&f=i" } }, { @@ -96,7 +96,7 @@ "id": "a121a07f-1579-4465-bc5e-5c5b02a0c421", "impid": "impStoredAuctionResponse", "price": 0.9, - "wurl": "http://localhost:8000/event?t=win&b=a121a07f-1579-4465-bc5e-5c5b02a0c421&a=5001&f=i" + "wurl": "http://localhost:8000/event?t=win&b=a121a07f-1579-4465-bc5e-5c5b02a0c421&a=5001&ts=1000&bidder=appnexus&f=i" } }, { @@ -109,7 +109,7 @@ "crid": "crid1", "w": 300, "h": 250, - "wurl": "http://localhost:8000/event?t=win&b=880290288&a=5001&f=i", + "wurl": "http://localhost:8000/event?t=win&b=880290288&a=5001&ts=1000&bidder=rubicon&f=i", "ext": { "rp": { "targeting": [ @@ -140,7 +140,7 @@ "crid": "29681110", "w": 300, "h": 250, - "wurl": "http://localhost:8000/event?t=win&b=7706636740145184841&a=5001&f=i", + "wurl": "http://localhost:8000/event?t=win&b=7706636740145184841&a=5001&ts=1000&bidder=appnexus&f=i", "ext": { "appnexus": { "brand_id": 1, @@ -154,7 +154,7 @@ }, { "type": "xml", - "value": "", + "value": "", "expiry": 120 } ] diff --git a/src/test/resources/org/prebid/server/it/openrtb2/sharethrough/test-auction-sharethrough-request.json b/src/test/resources/org/prebid/server/it/openrtb2/sharethrough/test-auction-sharethrough-request.json index aa94be5cb7d..cce23548ca3 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/sharethrough/test-auction-sharethrough-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/sharethrough/test-auction-sharethrough-request.json @@ -87,7 +87,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } }, "user": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/sharethrough/test-auction-sharethrough-response.json b/src/test/resources/org/prebid/server/it/openrtb2/sharethrough/test-auction-sharethrough-response.json index 19b0ad1aec6..8ebbd44115c 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/sharethrough/test-auction-sharethrough-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/sharethrough/test-auction-sharethrough-response.json @@ -59,7 +59,7 @@ "cache": [ { "uri": "{{ cache.endpoint }}", - "requestbody": "{\"puts\":[{\"type\":\"json\",\"value\":{\"id\":\"bid\",\"impid\":\"bid\",\"price\":10,\"adm\":\"\\n\\t\\t
\\n\\t\\t\\n\\t\\t\\t\\n\",\"adid\":\"arid\",\"cid\":\"cmpKey\",\"crid\":\"creaKey\",\"w\":50,\"h\":50,\"wurl\":\"http://localhost:8000/event?t=win&b=bid&a=publisherId&f=i\"}}]}", + "requestbody": "{\"puts\":[{\"type\":\"json\",\"value\":{\"id\":\"bid\",\"impid\":\"bid\",\"price\":10,\"adm\":\"\\n\\t\\t
\\n\\t\\t\\n\\t\\t\\t\\n\",\"adid\":\"arid\",\"cid\":\"cmpKey\",\"crid\":\"creaKey\",\"w\":50,\"h\":50,\"wurl\":\"http://localhost:8000/event?t=win&b=bid&a=publisherId&ts=1000&bidder=sharethrough&f=i\"}}]}", "responsebody": "{\"responses\":[{\"uuid\":\"a03927f1-86e1-48fb-9efc-da9104a44e39\"}]}", "status": 200 } @@ -182,7 +182,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } @@ -191,6 +192,7 @@ "sharethrough": "{{ sharethrough.response_time_ms }}", "cache": "{{ cache.response_time_ms }}" }, + "auctiontimestamp": 1000, "tmaxrequest": 3000 } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/sharethrough/test-cache-sharethrough-request.json b/src/test/resources/org/prebid/server/it/openrtb2/sharethrough/test-cache-sharethrough-request.json index 21a1976dfb5..8e3f1bfa381 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/sharethrough/test-cache-sharethrough-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/sharethrough/test-cache-sharethrough-request.json @@ -12,7 +12,7 @@ "crid": "creaKey", "w": 50, "h": 50, - "wurl": "http://localhost:8000/event?t=win&b=bid&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=bid&a=publisherId&ts=1000&bidder=sharethrough&f=i" } } ] diff --git a/src/test/resources/org/prebid/server/it/openrtb2/smartrtb/test-auction-smartrtb-request.json b/src/test/resources/org/prebid/server/it/openrtb2/smartrtb/test-auction-smartrtb-request.json index abbf2730446..badbeec6516 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/smartrtb/test-auction-smartrtb-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/smartrtb/test-auction-smartrtb-request.json @@ -102,7 +102,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } }, "user": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/smartrtb/test-auction-smartrtb-response.json b/src/test/resources/org/prebid/server/it/openrtb2/smartrtb/test-auction-smartrtb-response.json index 91bcab37537..9c6346cb18c 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/smartrtb/test-auction-smartrtb-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/smartrtb/test-auction-smartrtb-response.json @@ -1,12 +1,5 @@ { "cur": "USD", - "ext": { - "responsetimemillis": { - "cache": "{{ cache.response_time_ms }}", - "smartrtb": "{{ smartrtb.response_time_ms }}" - }, - "tmaxrequest": 5000 - }, "id": "tid", "seatbid": [ { @@ -46,5 +39,13 @@ "group": 0, "seat": "smartrtb" } - ] + ], + "ext": { + "responsetimemillis": { + "cache": "{{ cache.response_time_ms }}", + "smartrtb": "{{ smartrtb.response_time_ms }}" + }, + "auctiontimestamp": 1000, + "tmaxrequest": 5000 + } } \ No newline at end of file diff --git a/src/test/resources/org/prebid/server/it/openrtb2/smartrtb/test-cache-smartrtb-request.json b/src/test/resources/org/prebid/server/it/openrtb2/smartrtb/test-cache-smartrtb-request.json index 7ee1cd22e16..2c3e04489f8 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/smartrtb/test-cache-smartrtb-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/smartrtb/test-cache-smartrtb-request.json @@ -9,7 +9,7 @@ "id": "1", "impid": "imp123", "price": 0.01, - "wurl": "http://localhost:8000/event?t=win&b=1&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=1&a=publisherId&ts=1000&bidder=smartrtb&f=i" } } ] diff --git a/src/test/resources/org/prebid/server/it/openrtb2/smartrtb/test-smartrtb-bid-request.json b/src/test/resources/org/prebid/server/it/openrtb2/smartrtb/test-smartrtb-bid-request.json index 8e3e3e94044..2cec4b0a600 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/smartrtb/test-smartrtb-bid-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/smartrtb/test-smartrtb-bid-request.json @@ -42,7 +42,8 @@ } ] } - } + }, + "auctiontimestamp": 1000 } }, "id": "tid", diff --git a/src/test/resources/org/prebid/server/it/openrtb2/somoaudience/test-auction-somoaudience-request.json b/src/test/resources/org/prebid/server/it/openrtb2/somoaudience/test-auction-somoaudience-request.json index 192ecbf6cee..e1a86ba12d2 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/somoaudience/test-auction-somoaudience-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/somoaudience/test-auction-somoaudience-request.json @@ -120,7 +120,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } }, "user": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/somoaudience/test-auction-somoaudience-response.json b/src/test/resources/org/prebid/server/it/openrtb2/somoaudience/test-auction-somoaudience-response.json index 4f416ba8c0e..a2691c1ed83 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/somoaudience/test-auction-somoaudience-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/somoaudience/test-auction-somoaudience-response.json @@ -161,6 +161,7 @@ "somoaudience": "{{ somoaudience.response_time_ms }}", "cache": "{{ cache.response_time_ms }}" }, + "auctiontimestamp": 1000, "tmaxrequest": 5000 } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/somoaudience/test-cache-somoaudience-request.json b/src/test/resources/org/prebid/server/it/openrtb2/somoaudience/test-cache-somoaudience-request.json index 8e3456417cf..82981c3fbf6 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/somoaudience/test-cache-somoaudience-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/somoaudience/test-cache-somoaudience-request.json @@ -10,7 +10,7 @@ "crid": "crid16", "w": 300, "h": 250, - "wurl": "http://localhost:8000/event?t=win&b=bidId01&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=bidId01&a=publisherId&ts=1000&bidder=somoaudience&f=i" } }, { @@ -23,7 +23,7 @@ "crid": "crid17", "w": 360, "h": 240, - "wurl": "http://localhost:8000/event?t=win&b=bidId02&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=bidId02&a=publisherId&ts=1000&bidder=somoaudience&f=i" } }, { @@ -36,7 +36,7 @@ "crid": "crid18", "w": 1024, "h": 576, - "wurl": "http://localhost:8000/event?t=win&b=bidId03&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=bidId03&a=publisherId&ts=1000&bidder=somoaudience&f=i" } }, { @@ -56,7 +56,7 @@ "cat": [ "IAB3-1" ], - "wurl": "http://localhost:8000/event?t=win&b=bidId04&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=bidId04&a=publisherId&ts=1000&bidder=somoaudience&f=i" } }, { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/sonobi/test-auction-sonobi-request.json b/src/test/resources/org/prebid/server/it/openrtb2/sonobi/test-auction-sonobi-request.json index 6a1a240c3dc..5279da96433 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/sonobi/test-auction-sonobi-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/sonobi/test-auction-sonobi-request.json @@ -81,7 +81,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } }, "user": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/sonobi/test-auction-sonobi-response.json b/src/test/resources/org/prebid/server/it/openrtb2/sonobi/test-auction-sonobi-response.json index f8f33840e40..49b288f9ef1 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/sonobi/test-auction-sonobi-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/sonobi/test-auction-sonobi-response.json @@ -96,6 +96,7 @@ "sonobi": "{{ sonobi.response_time_ms }}", "cache": "{{ cache.response_time_ms }}" }, + "auctiontimestamp": 1000, "tmaxrequest": 5000 } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/sonobi/test-cache-sonobi-request.json b/src/test/resources/org/prebid/server/it/openrtb2/sonobi/test-cache-sonobi-request.json index db1ede43d14..dce413d579d 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/sonobi/test-cache-sonobi-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/sonobi/test-cache-sonobi-request.json @@ -10,7 +10,7 @@ "crid": "crid001", "w": 300, "h": 250, - "wurl": "http://localhost:8000/event?t=win&b=bid001&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=bid001&a=publisherId&ts=1000&bidder=sonobi&f=i" } }, { @@ -31,7 +31,7 @@ ], "w": 640, "h": 480, - "wurl": "http://localhost:8000/event?t=win&b=bid01&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=bid01&a=publisherId&ts=1000&bidder=sonobi&f=i" } }, { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/sonobi/test-sonobi-bid-request-1.json b/src/test/resources/org/prebid/server/it/openrtb2/sonobi/test-sonobi-bid-request-1.json index 7fe0a88c14f..1c8b83df241 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/sonobi/test-sonobi-bid-request-1.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/sonobi/test-sonobi-bid-request-1.json @@ -92,7 +92,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } \ No newline at end of file diff --git a/src/test/resources/org/prebid/server/it/openrtb2/sonobi/test-sonobi-bid-request-2.json b/src/test/resources/org/prebid/server/it/openrtb2/sonobi/test-sonobi-bid-request-2.json index 38a22fe2d38..e9723f73440 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/sonobi/test-sonobi-bid-request-2.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/sonobi/test-sonobi-bid-request-2.json @@ -91,7 +91,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } \ No newline at end of file diff --git a/src/test/resources/org/prebid/server/it/openrtb2/sovrn/test-auction-sovrn-request.json b/src/test/resources/org/prebid/server/it/openrtb2/sovrn/test-auction-sovrn-request.json index cba77f2bcfc..e03397c6d13 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/sovrn/test-auction-sovrn-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/sovrn/test-auction-sovrn-request.json @@ -68,7 +68,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } }, "user": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/sovrn/test-auction-sovrn-response.json b/src/test/resources/org/prebid/server/it/openrtb2/sovrn/test-auction-sovrn-response.json index 7a964f2235b..5cbd40b805d 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/sovrn/test-auction-sovrn-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/sovrn/test-auction-sovrn-response.json @@ -48,6 +48,7 @@ "sovrn": "{{ sovrn.response_time_ms }}", "cache": "{{ cache.response_time_ms }}" }, + "auctiontimestamp": 1000, "tmaxrequest": 5000 } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/sovrn/test-cache-sovrn-request.json b/src/test/resources/org/prebid/server/it/openrtb2/sovrn/test-cache-sovrn-request.json index e581f1c5b14..3901e24e106 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/sovrn/test-cache-sovrn-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/sovrn/test-cache-sovrn-request.json @@ -10,7 +10,7 @@ "crid": "crid13", "w": 300, "h": 250, - "wurl": "http://localhost:8000/event?t=win&b=600527793&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=600527793&a=publisherId&ts=1000&bidder=sovrn&f=i" } } ] diff --git a/src/test/resources/org/prebid/server/it/openrtb2/sovrn/test-sovrn-bid-request-1.json b/src/test/resources/org/prebid/server/it/openrtb2/sovrn/test-sovrn-bid-request-1.json index 4f651ed6001..e445617c04d 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/sovrn/test-sovrn-bid-request-1.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/sovrn/test-sovrn-bid-request-1.json @@ -94,7 +94,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } \ No newline at end of file diff --git a/src/test/resources/org/prebid/server/it/openrtb2/synacormedia/test-auction-synacormedia-request.json b/src/test/resources/org/prebid/server/it/openrtb2/synacormedia/test-auction-synacormedia-request.json index 07334aa84d0..8433aa5dfea 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/synacormedia/test-auction-synacormedia-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/synacormedia/test-auction-synacormedia-request.json @@ -84,7 +84,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } }, "user": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/synacormedia/test-auction-synacormedia-response.json b/src/test/resources/org/prebid/server/it/openrtb2/synacormedia/test-auction-synacormedia-response.json index fa2b5af036b..c15bbb00622 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/synacormedia/test-auction-synacormedia-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/synacormedia/test-auction-synacormedia-response.json @@ -93,6 +93,7 @@ "synacormedia": "{{ synacormedia.response_time_ms }}", "cache": "{{ cache.response_time_ms }}" }, + "auctiontimestamp": 1000, "tmaxrequest": 5000 } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/synacormedia/test-cache-synacormedia-request.json b/src/test/resources/org/prebid/server/it/openrtb2/synacormedia/test-cache-synacormedia-request.json index edbb38a853c..80b664508ec 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/synacormedia/test-cache-synacormedia-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/synacormedia/test-cache-synacormedia-request.json @@ -12,7 +12,7 @@ "crid": "crid001", "w": 300, "h": 250, - "wurl": "http://localhost:8000/event?t=win&b=bid001&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=bid001&a=publisherId&ts=1000&bidder=synacormedia&f=i" } }, { @@ -28,7 +28,7 @@ "crid": "crid002", "w": 300, "h": 250, - "wurl": "http://localhost:8000/event?t=win&b=bid002&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=bid002&a=publisherId&ts=1000&bidder=synacormedia&f=i" } }, { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/tappx/test-auction-tappx-request.json b/src/test/resources/org/prebid/server/it/openrtb2/tappx/test-auction-tappx-request.json index bbb0dc36cb8..8657c9e5c11 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/tappx/test-auction-tappx-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/tappx/test-auction-tappx-request.json @@ -69,7 +69,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } }, "user": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/tappx/test-auction-tappx-response.json b/src/test/resources/org/prebid/server/it/openrtb2/tappx/test-auction-tappx-response.json index 954ea8a8bb9..ae03941a925 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/tappx/test-auction-tappx-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/tappx/test-auction-tappx-response.json @@ -56,6 +56,7 @@ "tappx": "{{ tappx.response_time_ms }}", "cache": "{{ cache.response_time_ms }}" }, + "auctiontimestamp": 1000, "tmaxrequest": 5000 } } \ No newline at end of file diff --git a/src/test/resources/org/prebid/server/it/openrtb2/tappx/test-cache-tappx-request.json b/src/test/resources/org/prebid/server/it/openrtb2/tappx/test-cache-tappx-request.json index cd089ccb394..5898b04c765 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/tappx/test-cache-tappx-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/tappx/test-cache-tappx-request.json @@ -14,7 +14,7 @@ "adomain": ["test.com"], "h": 250, "w": 300, - "wurl": "http://localhost:8000/event?t=win&b=wehM-93KGr0_0_0&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=wehM-93KGr0_0_0&a=publisherId&ts=1000&bidder=tappx&f=i" } } ] diff --git a/src/test/resources/org/prebid/server/it/openrtb2/tappx/test-tappx-bid-request.json b/src/test/resources/org/prebid/server/it/openrtb2/tappx/test-tappx-bid-request.json index ca51f8adf96..901250a66ff 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/tappx/test-tappx-bid-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/tappx/test-tappx-bid-request.json @@ -95,7 +95,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/triplelift/test-auction-triplelift-request.json b/src/test/resources/org/prebid/server/it/openrtb2/triplelift/test-auction-triplelift-request.json index 3cef1e574fb..8a69ab578ab 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/triplelift/test-auction-triplelift-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/triplelift/test-auction-triplelift-request.json @@ -66,7 +66,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } }, "user": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/triplelift/test-auction-triplelift-response.json b/src/test/resources/org/prebid/server/it/openrtb2/triplelift/test-auction-triplelift-response.json index af819675ab8..f388308e49e 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/triplelift/test-auction-triplelift-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/triplelift/test-auction-triplelift-response.json @@ -59,6 +59,7 @@ "triplelift": "{{ triplelift.response_time_ms }}", "cache": "{{ cache.response_time_ms }}" }, + "auctiontimestamp": 1000, "tmaxrequest": 5000 } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/triplelift/test-cache-triplelift-request.json b/src/test/resources/org/prebid/server/it/openrtb2/triplelift/test-cache-triplelift-request.json index 2bf97fe6fc2..ce6f62b2ba4 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/triplelift/test-cache-triplelift-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/triplelift/test-cache-triplelift-request.json @@ -21,7 +21,7 @@ "format": 2 } }, - "wurl": "http://localhost:8000/event?t=win&b=7706636740145184841&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=7706636740145184841&a=publisherId&ts=1000&bidder=triplelift&f=i" } } ] diff --git a/src/test/resources/org/prebid/server/it/openrtb2/triplelift/test-triplelift-bid-request.json b/src/test/resources/org/prebid/server/it/openrtb2/triplelift/test-triplelift-bid-request.json index 0e37d11239a..92fade87712 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/triplelift/test-triplelift-bid-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/triplelift/test-triplelift-bid-request.json @@ -92,7 +92,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/tripleliftnative/test-auction-triplelift-native-request.json b/src/test/resources/org/prebid/server/it/openrtb2/tripleliftnative/test-auction-triplelift-native-request.json index 62c511169ca..2fc4e00a8cd 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/tripleliftnative/test-auction-triplelift-native-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/tripleliftnative/test-auction-triplelift-native-request.json @@ -66,7 +66,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } }, "user": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/tripleliftnative/test-auction-triplelift-native-response.json b/src/test/resources/org/prebid/server/it/openrtb2/tripleliftnative/test-auction-triplelift-native-response.json index 2d2e715d3bf..a2bfa80824d 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/tripleliftnative/test-auction-triplelift-native-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/tripleliftnative/test-auction-triplelift-native-response.json @@ -55,7 +55,7 @@ "cache": [ { "uri": "{{ cache.endpoint }}", - "requestbody": "{\"puts\":[{\"type\":\"json\",\"value\":{\"id\":\"7706636740145184841\",\"impid\":\"test-imp-id\",\"price\":0.5,\"adm\":\"some-test-ad\",\"adid\":\"29681110\",\"adomain\":[\"triplelift.com\"],\"iurl\":\"http://nym1-ib.adnxs.com/cr?id=29681110\",\"cid\":\"958\",\"crid\":\"29681110\",\"w\":300,\"h\":250,\"wurl\":\"http://localhost:8000/event?t=win&b=7706636740145184841&a=test&f=i\"}}]}", + "requestbody": "{\"puts\":[{\"type\":\"json\",\"value\":{\"id\":\"7706636740145184841\",\"impid\":\"test-imp-id\",\"price\":0.5,\"adm\":\"some-test-ad\",\"adid\":\"29681110\",\"adomain\":[\"triplelift.com\"],\"iurl\":\"http://nym1-ib.adnxs.com/cr?id=29681110\",\"cid\":\"958\",\"crid\":\"29681110\",\"w\":300,\"h\":250,\"wurl\":\"http://localhost:8000/event?t=win&b=7706636740145184841&a=test&ts=1000&bidder=triplelift_native&f=i\"}}]}", "responsebody": "{\"responses\":[{\"uuid\":\"029e95ca-1a14-4e45-9669-8ad8d667de50\"}]}", "status": 200 } @@ -63,7 +63,7 @@ "triplelift_native": [ { "uri": "{{ triplelift_native.exchange_uri }}", - "requestbody": "{\"id\":\"tid\",\"imp\":[{\"id\":\"impId1\",\"native\":{\"request\":\"{\\\"ver\\\":\\\"1.1\\\",\\\"context\\\":1,\\\"contextsubtype\\\":11,\\\"plcmttype\\\":4,\\\"plcmtcnt\\\":1,\\\"assets\\\":[{\\\"id\\\":0,\\\"required\\\":1,\\\"title\\\":{\\\"len\\\":500}}]}\"},\"tagid\":\"foo\",\"ext\":{\"bidder\":{\"inventoryCode\":\"foo\"}}}],\"site\":{\"domain\":\"example.com\",\"page\":\"http://www.example.com\",\"publisher\":{\"id\":\"test\"},\"ext\":{\"amp\":0}},\"device\":{\"ua\":\"userAgent\",\"dnt\":2,\"ip\":\"193.168.244.1\",\"pxratio\":4.2,\"language\":\"en\",\"ifa\":\"ifaId\"},\"user\":{\"buyeruid\":\"T\",\"ext\":{\"digitrust\":{\"id\":\"id\",\"keyv\":123,\"pref\":0},\"consent\":\"consentValue\"}},\"at\":1,\"tmax\":5000,\"cur\":[\"USD\"],\"source\":{\"fd\":1,\"tid\":\"tid\"},\"regs\":{\"ext\":{\"gdpr\":0}},\"ext\":{\"prebid\":{\"debug\":1,\"aliases\":{\"appnexusAlias\":\"appnexus\",\"conversantAlias\":\"conversant\"},\"targeting\":{\"pricegranularity\":{\"precision\":2,\"ranges\":[{\"max\":20,\"increment\":0.1}]},\"currency\":{\"rates\":{\"EUR\":{\"USD\":1.2406},\"USD\":{\"EUR\":0.811}}},\"includewinners\":true,\"includebidderkeys\":true},\"cache\":{\"bids\":{},\"vastxml\":{\"ttlseconds\":120}}}}}", + "requestbody": "{\"id\":\"tid\",\"imp\":[{\"id\":\"impId1\",\"native\":{\"request\":\"{\\\"ver\\\":\\\"1.1\\\",\\\"context\\\":1,\\\"contextsubtype\\\":11,\\\"plcmttype\\\":4,\\\"plcmtcnt\\\":1,\\\"assets\\\":[{\\\"id\\\":0,\\\"required\\\":1,\\\"title\\\":{\\\"len\\\":500}}]}\"},\"tagid\":\"foo\",\"ext\":{\"bidder\":{\"inventoryCode\":\"foo\"}}}],\"site\":{\"domain\":\"example.com\",\"page\":\"http://www.example.com\",\"publisher\":{\"id\":\"test\"},\"ext\":{\"amp\":0}},\"device\":{\"ua\":\"userAgent\",\"dnt\":2,\"ip\":\"193.168.244.1\",\"pxratio\":4.2,\"language\":\"en\",\"ifa\":\"ifaId\"},\"user\":{\"buyeruid\":\"T\",\"ext\":{\"digitrust\":{\"id\":\"id\",\"keyv\":123,\"pref\":0},\"consent\":\"consentValue\"}},\"at\":1,\"tmax\":5000,\"cur\":[\"USD\"],\"source\":{\"fd\":1,\"tid\":\"tid\"},\"regs\":{\"ext\":{\"gdpr\":0}},\"ext\":{\"prebid\":{\"debug\":1,\"aliases\":{\"appnexusAlias\":\"appnexus\",\"conversantAlias\":\"conversant\"},\"targeting\":{\"pricegranularity\":{\"precision\":2,\"ranges\":[{\"max\":20,\"increment\":0.1}]},\"currency\":{\"rates\":{\"EUR\":{\"USD\":1.2406},\"USD\":{\"EUR\":0.811}}},\"includewinners\":true,\"includebidderkeys\":true},\"cache\":{\"bids\":{},\"vastxml\":{\"ttlseconds\":120}},\"auctiontimestamp\":1000}}}", "responsebody": "{\"id\":\"test-request-id\",\"seatbid\":[{\"seat\":\"958\",\"bid\":[{\"id\":\"7706636740145184841\",\"impid\":\"test-imp-id\",\"price\":0.5,\"adid\":\"29681110\",\"adm\":\"some-test-ad\",\"adomain\":[\"triplelift.com\"],\"iurl\":\"http://nym1-ib.adnxs.com/cr?id=29681110\",\"cid\":\"958\",\"crid\":\"29681110\",\"h\":250,\"w\":300}]}],\"bidid\":\"5778926625248726496\",\"cur\":\"USD\"}", "status": 200 } @@ -161,7 +161,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } @@ -170,6 +171,7 @@ "triplelift_native": "{{ triplelift_native.response_time_ms }}", "cache": "{{ cache.response_time_ms }}" }, + "auctiontimestamp": 1000, "tmaxrequest": 5000 } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/tripleliftnative/test-cache-triplelift-native-request.json b/src/test/resources/org/prebid/server/it/openrtb2/tripleliftnative/test-cache-triplelift-native-request.json index 5daec4b8afe..cceeb5964a0 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/tripleliftnative/test-cache-triplelift-native-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/tripleliftnative/test-cache-triplelift-native-request.json @@ -16,7 +16,7 @@ "crid": "29681110", "h": 250, "w": 300, - "wurl": "http://localhost:8000/event?t=win&b=7706636740145184841&a=test&f=i" + "wurl": "http://localhost:8000/event?t=win&b=7706636740145184841&a=test&ts=1000&bidder=triplelift_native&f=i" } } ] diff --git a/src/test/resources/org/prebid/server/it/openrtb2/tripleliftnative/test-triplelift-native-bid-request.json b/src/test/resources/org/prebid/server/it/openrtb2/tripleliftnative/test-triplelift-native-bid-request.json index c02973d6b2b..3d8d3c1dbfd 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/tripleliftnative/test-triplelift-native-bid-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/tripleliftnative/test-triplelift-native-bid-request.json @@ -92,7 +92,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/ttx/test-auction-ttx-request.json b/src/test/resources/org/prebid/server/it/openrtb2/ttx/test-auction-ttx-request.json index 361efb932bd..7493fab2fe2 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/ttx/test-auction-ttx-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/ttx/test-auction-ttx-request.json @@ -68,7 +68,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } }, "user": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/ttx/test-auction-ttx-response.json b/src/test/resources/org/prebid/server/it/openrtb2/ttx/test-auction-ttx-response.json index 1b004d95ad1..42988e04108 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/ttx/test-auction-ttx-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/ttx/test-auction-ttx-response.json @@ -48,6 +48,7 @@ "ttx": "{{ ttx.response_time_ms }}", "cache": "{{ cache.response_time_ms }}" }, + "auctiontimestamp": 1000, "tmaxrequest": 5000 } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/ttx/test-cache-ttx-request.json b/src/test/resources/org/prebid/server/it/openrtb2/ttx/test-cache-ttx-request.json index 6a641edaa42..f859488fbea 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/ttx/test-cache-ttx-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/ttx/test-cache-ttx-request.json @@ -10,7 +10,7 @@ "crid": "crid001", "w": 300, "h": 250, - "wurl": "http://localhost:8000/event?t=win&b=bid001&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=bid001&a=publisherId&ts=1000&bidder=ttx&f=i" } } ] diff --git a/src/test/resources/org/prebid/server/it/openrtb2/ttx/test-ttx-bid-request-1.json b/src/test/resources/org/prebid/server/it/openrtb2/ttx/test-ttx-bid-request-1.json index c95d86e8d4a..d4a165a3e98 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/ttx/test-ttx-bid-request-1.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/ttx/test-ttx-bid-request-1.json @@ -93,7 +93,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } \ No newline at end of file diff --git a/src/test/resources/org/prebid/server/it/openrtb2/unruly/test-auction-unruly-request.json b/src/test/resources/org/prebid/server/it/openrtb2/unruly/test-auction-unruly-request.json index 2349c3b6309..7004a9f3813 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/unruly/test-auction-unruly-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/unruly/test-auction-unruly-request.json @@ -82,7 +82,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } }, "user": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/unruly/test-auction-unruly-response.json b/src/test/resources/org/prebid/server/it/openrtb2/unruly/test-auction-unruly-response.json index d408acb57f0..f2149000182 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/unruly/test-auction-unruly-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/unruly/test-auction-unruly-response.json @@ -94,6 +94,7 @@ "unruly": "{{ unruly.response_time_ms }}", "cache": "{{ cache.response_time_ms }}" }, + "auctiontimestamp": 1000, "tmaxrequest": 5000 } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/unruly/test-cache-unruly-request.json b/src/test/resources/org/prebid/server/it/openrtb2/unruly/test-cache-unruly-request.json index 356cb57cc61..efc760ec62c 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/unruly/test-cache-unruly-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/unruly/test-cache-unruly-request.json @@ -10,7 +10,7 @@ "crid": "crid001", "w": 800, "h": 600, - "wurl": "http://localhost:8000/event?t=win&b=bid001&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=bid001&a=publisherId&ts=1000&bidder=unruly&f=i" } }, { @@ -23,7 +23,7 @@ "crid": "crid002", "w": 640, "h": 480, - "wurl": "http://localhost:8000/event?t=win&b=bid002&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=bid002&a=publisherId&ts=1000&bidder=unruly&f=i" } }, { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/unruly/test-unruly-bid-request-1.json b/src/test/resources/org/prebid/server/it/openrtb2/unruly/test-unruly-bid-request-1.json index cc26fe99e5a..a9c66c13bd9 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/unruly/test-unruly-bid-request-1.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/unruly/test-unruly-bid-request-1.json @@ -91,7 +91,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } \ No newline at end of file diff --git a/src/test/resources/org/prebid/server/it/openrtb2/unruly/test-unruly-bid-request-2.json b/src/test/resources/org/prebid/server/it/openrtb2/unruly/test-unruly-bid-request-2.json index 83fd1c20f62..6fcb0afda22 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/unruly/test-unruly-bid-request-2.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/unruly/test-unruly-bid-request-2.json @@ -91,7 +91,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } \ No newline at end of file diff --git a/src/test/resources/org/prebid/server/it/openrtb2/verizonmedia/test-auction-verizonmedia-request.json b/src/test/resources/org/prebid/server/it/openrtb2/verizonmedia/test-auction-verizonmedia-request.json index d4cf7850a13..c99fe17eb62 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/verizonmedia/test-auction-verizonmedia-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/verizonmedia/test-auction-verizonmedia-request.json @@ -67,7 +67,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } }, "user": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/verizonmedia/test-auction-verizonmedia-response.json b/src/test/resources/org/prebid/server/it/openrtb2/verizonmedia/test-auction-verizonmedia-response.json index bc6805398b5..ee965adc391 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/verizonmedia/test-auction-verizonmedia-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/verizonmedia/test-auction-verizonmedia-response.json @@ -48,6 +48,7 @@ "verizonmedia": "{{ verizonmedia.response_time_ms }}", "cache": "{{ cache.response_time_ms }}" }, + "auctiontimestamp": 1000, "tmaxrequest": 5000 } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/verizonmedia/test-cache-verizonmedia-request.json b/src/test/resources/org/prebid/server/it/openrtb2/verizonmedia/test-cache-verizonmedia-request.json index 6a641edaa42..261066bace0 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/verizonmedia/test-cache-verizonmedia-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/verizonmedia/test-cache-verizonmedia-request.json @@ -10,7 +10,7 @@ "crid": "crid001", "w": 300, "h": 250, - "wurl": "http://localhost:8000/event?t=win&b=bid001&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=bid001&a=publisherId&ts=1000&bidder=verizonmedia&f=i" } } ] diff --git a/src/test/resources/org/prebid/server/it/openrtb2/verizonmedia/test-verizonmedia-bid-request-1.json b/src/test/resources/org/prebid/server/it/openrtb2/verizonmedia/test-verizonmedia-bid-request-1.json index d9129b57584..c3eb68c3802 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/verizonmedia/test-verizonmedia-bid-request-1.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/verizonmedia/test-verizonmedia-bid-request-1.json @@ -95,7 +95,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } \ No newline at end of file diff --git a/src/test/resources/org/prebid/server/it/openrtb2/visx/test-auction-visx-request.json b/src/test/resources/org/prebid/server/it/openrtb2/visx/test-auction-visx-request.json index 5ca165f3f71..1b34609080c 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/visx/test-auction-visx-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/visx/test-auction-visx-request.json @@ -74,7 +74,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } }, "user": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/visx/test-auction-visx-response.json b/src/test/resources/org/prebid/server/it/openrtb2/visx/test-auction-visx-response.json index af5287be925..d5334fc190a 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/visx/test-auction-visx-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/visx/test-auction-visx-response.json @@ -51,6 +51,7 @@ "cache": "{{ cache.response_time_ms }}", "visx": "{{ visx.response_time_ms }}" }, + "auctiontimestamp": 1000, "tmaxrequest": 5000 } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/visx/test-cache-visx-request.json b/src/test/resources/org/prebid/server/it/openrtb2/visx/test-cache-visx-request.json index 2a9a93e6e43..e53427433f8 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/visx/test-cache-visx-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/visx/test-cache-visx-request.json @@ -13,7 +13,7 @@ "crid": "11_222222", "w": 300, "h": 250, - "wurl": "http://localhost:8000/event?t=win&b=1&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=1&a=publisherId&ts=1000&bidder=visx&f=i" } } ] diff --git a/src/test/resources/org/prebid/server/it/openrtb2/visx/test-visx-bid-request.json b/src/test/resources/org/prebid/server/it/openrtb2/visx/test-visx-bid-request.json index ed7ae775d74..6c4f491491a 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/visx/test-visx-bid-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/visx/test-visx-bid-request.json @@ -99,7 +99,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } \ No newline at end of file diff --git a/src/test/resources/org/prebid/server/it/openrtb2/vrtcal/test-auction-vrtcal-request.json b/src/test/resources/org/prebid/server/it/openrtb2/vrtcal/test-auction-vrtcal-request.json index 4af139fced2..1ae7f58b373 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/vrtcal/test-auction-vrtcal-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/vrtcal/test-auction-vrtcal-request.json @@ -63,7 +63,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } }, "user": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/vrtcal/test-auction-vrtcal-response.json b/src/test/resources/org/prebid/server/it/openrtb2/vrtcal/test-auction-vrtcal-response.json index 50eb0ba9d51..211168ff510 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/vrtcal/test-auction-vrtcal-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/vrtcal/test-auction-vrtcal-response.json @@ -50,6 +50,7 @@ "vrtcal": "{{ vrtcal.response_time_ms }}", "cache": "{{ cache.response_time_ms }}" }, + "auctiontimestamp": 1000, "tmaxrequest": 5000 } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/vrtcal/test-cache-vrtcal-request.json b/src/test/resources/org/prebid/server/it/openrtb2/vrtcal/test-cache-vrtcal-request.json index 64d8ec2f61c..bca493a3649 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/vrtcal/test-cache-vrtcal-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/vrtcal/test-cache-vrtcal-request.json @@ -10,7 +10,7 @@ "crid": "crid001", "w": 300, "h": 250, - "wurl": "http://localhost:8000/event?t=win&b=bid001&a=&f=i" + "wurl": "http://localhost:8000/event?t=win&b=bid001&a=&ts=1000&bidder=vrtcal&f=i" } } ] diff --git a/src/test/resources/org/prebid/server/it/openrtb2/vrtcal/test-vrtcal-bid-request-1.json b/src/test/resources/org/prebid/server/it/openrtb2/vrtcal/test-vrtcal-bid-request-1.json index 8a2c6078058..1211e0d006a 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/vrtcal/test-vrtcal-bid-request-1.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/vrtcal/test-vrtcal-bid-request-1.json @@ -82,7 +82,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } \ No newline at end of file diff --git a/src/test/resources/org/prebid/server/it/openrtb2/yieldmo/test-auction-yieldmo-request.json b/src/test/resources/org/prebid/server/it/openrtb2/yieldmo/test-auction-yieldmo-request.json index 659d1e316a1..01a7617f8a0 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/yieldmo/test-auction-yieldmo-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/yieldmo/test-auction-yieldmo-request.json @@ -66,7 +66,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } }, "user": { diff --git a/src/test/resources/org/prebid/server/it/openrtb2/yieldmo/test-auction-yieldmo-response.json b/src/test/resources/org/prebid/server/it/openrtb2/yieldmo/test-auction-yieldmo-response.json index 3b799ba8e0d..08d249da9de 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/yieldmo/test-auction-yieldmo-response.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/yieldmo/test-auction-yieldmo-response.json @@ -50,6 +50,7 @@ "cache": "{{ cache.response_time_ms }}", "yieldmo": "{{ yieldmo.response_time_ms }}" }, + "auctiontimestamp": 1000, "tmaxrequest": 5000 } } diff --git a/src/test/resources/org/prebid/server/it/openrtb2/yieldmo/test-cache-yieldmo-request.json b/src/test/resources/org/prebid/server/it/openrtb2/yieldmo/test-cache-yieldmo-request.json index b71e587c811..8611e1da62e 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/yieldmo/test-cache-yieldmo-request.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/yieldmo/test-cache-yieldmo-request.json @@ -12,7 +12,7 @@ "crid": "crid001", "w": 300, "h": 250, - "wurl": "http://localhost:8000/event?t=win&b=bid001&a=publisherId&f=i" + "wurl": "http://localhost:8000/event?t=win&b=bid001&a=publisherId&ts=1000&bidder=yieldmo&f=i" } } ] diff --git a/src/test/resources/org/prebid/server/it/openrtb2/yieldmo/test-yieldmo-bid-request-1.json b/src/test/resources/org/prebid/server/it/openrtb2/yieldmo/test-yieldmo-bid-request-1.json index 4d75cdc926f..651259f1ce3 100644 --- a/src/test/resources/org/prebid/server/it/openrtb2/yieldmo/test-yieldmo-bid-request-1.json +++ b/src/test/resources/org/prebid/server/it/openrtb2/yieldmo/test-yieldmo-bid-request-1.json @@ -89,7 +89,8 @@ "vastxml": { "ttlseconds": 120 } - } + }, + "auctiontimestamp": 1000 } } } \ No newline at end of file diff --git a/src/test/resources/org/prebid/server/it/storedrequests/test-amp-stored-request.json b/src/test/resources/org/prebid/server/it/storedrequests/test-amp-stored-request.json index f6267798118..cc2fc05bc84 100644 --- a/src/test/resources/org/prebid/server/it/storedrequests/test-amp-stored-request.json +++ b/src/test/resources/org/prebid/server/it/storedrequests/test-amp-stored-request.json @@ -63,7 +63,8 @@ }, "cache": { "bids": {} - } + }, + "auctiontimestamp": 1000 } }, "regs": { diff --git a/src/test/resources/org/prebid/server/it/vtrack/test-cache-request.json b/src/test/resources/org/prebid/server/it/vtrack/test-cache-request.json index 7fec57b7949..2ab63152efe 100644 --- a/src/test/resources/org/prebid/server/it/vtrack/test-cache-request.json +++ b/src/test/resources/org/prebid/server/it/vtrack/test-cache-request.json @@ -1,11 +1,9 @@ - { - "puts": [ - { - "value": "prebid.org wrapper", - "bidid": "bidid", - "bidder": "rubicon", - "ttlseconds": 3600, - "type": "xml" - } - ] - } +{ + "puts": [ + { + "type": "xml", + "value": "prebid.org wrapper", + "ttlseconds": 3600 + } + ] +} diff --git a/src/test/resources/org/prebid/server/it/vtrack/test-vtrack-request.json b/src/test/resources/org/prebid/server/it/vtrack/test-vtrack-request.json index fc98f07a89d..1be8338394a 100644 --- a/src/test/resources/org/prebid/server/it/vtrack/test-vtrack-request.json +++ b/src/test/resources/org/prebid/server/it/vtrack/test-vtrack-request.json @@ -1,11 +1,12 @@ { "puts": [ { - "bidid": "bidid", - "bidder": "rubicon", "type": "xml", "value": "prebid.org wrapper", - "ttlseconds": 3600 + "ttlseconds": 3600, + "bidid": "bidid", + "bidder": "rubicon", + "timestamp": 1000 } ] }