Skip to content

Commit

Permalink
rebase master
Browse files Browse the repository at this point in the history
  • Loading branch information
EvgeniiMunin committed Jan 22, 2025
1 parent 5247534 commit f155ee3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public void extractThrottlingMessagesFromBidRequestShouldReturnValidThrottlingMe
.banner(banner)
.build();
final Device device = givenDevice(identity(), "FRA");
final BidRequest bidRequest = givenBidRequest(request -> request, List.of(imp), device, null);
final BidRequest bidRequest = givenBidRequest(request -> request, List.of(imp), device);

final ZonedDateTime timestamp = ZonedDateTime.now(ZoneId.of("UTC"));
final Integer expectedHourBucket = timestamp.getHour();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -389,34 +389,6 @@ public void callShouldFilterBiddersBasedOnModelResults() throws OrtException, IO
.isEqualTo(expectedBidRequest);
}

static DatabaseReader givenDatabaseReader() throws IOException {
final URL url = new URL("https://git.io/GeoLite2-Country.mmdb");
final Path databasePath = Files.createTempFile("GeoLite2-Country", ".mmdb");

try (
InputStream inputStream = url.openStream();
FileOutputStream outputStream = new FileOutputStream(databasePath.toFile())) {
inputStream.transferTo(outputStream);
}

return new DatabaseReader.Builder(databasePath.toFile()).build();
}

static ExtRequest givenExtRequest(Double explorationRate) {
final ObjectNode greenbidsNode = TestBidRequestProvider.MAPPER.createObjectNode();
greenbidsNode.put("pbuid", "test-pbuid");
greenbidsNode.put("targetTpr", 0.60);
greenbidsNode.put("explorationRate", explorationRate);

final ObjectNode analyticsNode = TestBidRequestProvider.MAPPER.createObjectNode();
analyticsNode.set("greenbids-rtd", greenbidsNode);

return ExtRequest.of(ExtRequestPrebid
.builder()
.analytics(analyticsNode)
.build());
}

private AuctionContext givenAuctionContext(
BidRequest bidRequest,
UnaryOperator<AuctionContext.AuctionContextBuilder> auctionContextCustomizer,
Expand Down

0 comments on commit f155ee3

Please sign in to comment.