Skip to content

Commit

Permalink
support the timeout parameter in the conversant adapter (prebid#9673)
Browse files Browse the repository at this point in the history
Co-authored-by: johwier <john.wier@epsilon.com>
  • Loading branch information
2 people authored and jorgeluisrocha committed May 18, 2023
1 parent 4b71075 commit 6e64b55
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/conversantBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,10 @@ export const spec = {
}

if (bidderRequest) {
if (bidderRequest.timeout) {
deepSetValue(payload, 'tmax', bidderRequest.timeout);
}

// Add GDPR flag and consent string
if (bidderRequest.gdprConsent) {
userExt.consent = bidderRequest.gdprConsent.consentString;
Expand Down
8 changes: 8 additions & 0 deletions test/spec/modules/conversantBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,14 @@ describe('Conversant adapter tests', function() {
expect(payload.device).to.have.property('ua', navigator.userAgent);

expect(payload).to.not.have.property('user'); // there should be no user by default
expect(payload).to.not.have.property('tmax'); // there should be no user by default
});

it('Verify timeout', () => {
const bidderRequest = { timeout: 9999 };
const request = spec.buildRequests(bidRequests, bidderRequest);
const payload = request.data;
expect(payload.tmax).equals(bidderRequest.timeout);
});

it('Verify first party data', () => {
Expand Down

0 comments on commit 6e64b55

Please sign in to comment.