Skip to content

Add storedAuctionResponse on imp level.#3461

Merged
Compile-Ninja merged 4 commits into
masterfrom
add-imp-level-stored-auction-response
Oct 1, 2024
Merged

Add storedAuctionResponse on imp level.#3461
Compile-Ninja merged 4 commits into
masterfrom
add-imp-level-stored-auction-response

Conversation

@CTMBNara
Copy link
Copy Markdown
Collaborator

🔧 Type of changes

  • new bid adapter
  • update bid adapter
  • new feature
  • new analytics adapter
  • new module
  • bugfix
  • documentation
  • configuration
  • tech debt (test coverage, refactorings, etc.)

✨ What's the context?

What's the context for the changes? Are there any

🧠 Rationale behind the change

Why did you choose to make these changes? Were there any trade-offs you had to consider?

🧪 Test plan

How do you know the changes are safe to ship to production?

🏎 Quality check

  • Are your changes following our code style guidelines?
  • Are there any breaking changes in your code?
  • Does your test coverage exceed 90%?
  • Are there any erroneous console logs, debuggers or leftover code in your changes?

Comment on lines +310 to +318
final Map<String, String> storedResponse = new HashMap<>();
storedResponse.put("storedAuctionResponse1", mapper.writeValueAsString(asList(
SeatBid.builder().seat("appnexus").bid(singletonList(Bid.builder().id("id1").build())).build(),
SeatBid.builder().seat("rubicon").bid(singletonList(Bid.builder().id("id3").build())).build())));
storedResponse.put("storedAuctionResponse2", mapper.writeValueAsString(singletonList(
SeatBid.builder().seat("rubicon").bid(singletonList(Bid.builder().id("id2").build())).build())));

given(applicationSettings.getStoredResponses(any(), any())).willReturn(
Future.succeededFuture(StoredResponseDataResult.of(storedResponse, emptyList())));
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

it has redundant returning values, the test needs only storedAuctionResponse2, also I suggest checking that the first argument of the getStoredResponses contains only storedAuctionResponse2

Comment on lines +125 to +127
.map(impIdToExtPrebid -> Tuple2.of(
impIdToExtPrebid.getKey(),
extractAuctionStoredResponseId(impIdToExtPrebid.getValue())))
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

why do we use a custom Tuple2 when there is a Pair class from Apache libraries?

@Compile-Ninja Compile-Ninja merged commit 075bdf8 into master Oct 1, 2024
@Compile-Ninja Compile-Ninja deleted the add-imp-level-stored-auction-response branch October 1, 2024 10:52
sergseven pushed a commit to openx/prebid-server-java that referenced this pull request Dec 23, 2024
riteshghodrao pushed a commit to riteshghodrao/prebid-server-java that referenced this pull request Apr 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants