Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We're seeing occasional test suite failures related to the deal tier test
TestReadDealTiersFromImp
. The test case with descriptionimp.ext.prebid.bidder - same bidder listed twice but with different case the last one prevails
sometimes fails. This test case was recently added as part of the adapter name case insensitive initiative. The problem traces back to the fact that the function under test,ReadDealTiersFromImp
, attempts to unmarshalimp.ext.prebid.bidder
into typemap[string]struct
and then iterates over the map, normalizing each bidder name and ultimately selecting the deal tier information for the last occurrence of a given normalized bidder name. However, a map does not guarantee order so the order in which the keys are read from the map when iterating over it is unpredictable, which means we can't be sure which bidder name casing will be the last one encountered and ultimately selected.The team discussed and determined that the unpredictable behavior is acceptable for this edge case so we should just update the test to ensure deduping occurs rather than verifying the details of the selected deal tier.