Skip to content

Commit

Permalink
Bugfix: Skip Auction logic revert (#3324)
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoxaAntoxic authored Jul 24, 2024
1 parent 28574b5 commit 9505a8f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.prebid.server.auction;

import com.iab.openrtb.request.BidRequest;
import com.iab.openrtb.response.BidResponse;
import com.iab.openrtb.response.SeatBid;
import io.vertx.core.Future;
import org.apache.commons.collections4.CollectionUtils;
Expand Down Expand Up @@ -33,8 +32,7 @@ public SkippedAuctionService(StoredResponseProcessor storedResponseProcessor,

public Future<AuctionContext> skipAuction(AuctionContext auctionContext) {
if (auctionContext.isRequestRejected()) {
return Future.succeededFuture(auctionContext.with(
BidResponse.builder().seatbid(Collections.emptyList()).build()));
return Future.failedFuture("Rejected request cannot be skipped");
}

final ExtStoredAuctionResponse storedResponse = Optional.ofNullable(auctionContext.getBidRequest())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,8 @@ public void skipAuctionShouldReturnFailedFutureWhenRequestIsRejected() {
final Future<AuctionContext> result = target.skipAuction(givenAuctionContext);

// then
assertThat(result.succeeded()).isTrue();
final BidResponse expectedBidResponse = BidResponse.builder().seatbid(emptyList()).build();
assertThat(result.result()).isEqualTo(givenAuctionContext.with(expectedBidResponse));

assertThat(result.failed()).isTrue();
assertThat(result.cause()).hasMessage("Rejected request cannot be skipped");
verifyNoInteractions(storedResponseProcessor, bidResponseCreator);
}

Expand Down

0 comments on commit 9505a8f

Please sign in to comment.