diff --git a/modules/sovrnBidAdapter.js b/modules/sovrnBidAdapter.js index b825a554e4d..f21c4d1752a 100644 --- a/modules/sovrnBidAdapter.js +++ b/modules/sovrnBidAdapter.js @@ -151,11 +151,14 @@ export const spec = { site.page = bidderRequest.refererInfo.page site.domain = bidderRequest.refererInfo.domain + const tmax = deepAccess(bidderRequest, 'timeout'); + const sovrnBidReq = { id: getUniqueIdentifierStr(), imp: sovrnImps, site: site, - user: fpd.user || {} + user: fpd.user || {}, + tmax: tmax } if (schain) { diff --git a/test/spec/modules/sovrnBidAdapter_spec.js b/test/spec/modules/sovrnBidAdapter_spec.js index 831d3ae0315..c84013d1963 100644 --- a/test/spec/modules/sovrnBidAdapter_spec.js +++ b/test/spec/modules/sovrnBidAdapter_spec.js @@ -170,6 +170,19 @@ describe('sovrnBidAdapter', function() { expect(payload.site.domain).to.equal('example.com') }) + it('sets correct timeout', function() { + const bidderRequest = { + ...baseBidderRequest, + bidderCode: 'sovrn', + auctionId: '1d1a030790a475', + bidderRequestId: '22edbae2733bf6', + timeout: 3000, + bids: [baseBidRequest] + } + const payload = JSON.parse(spec.buildRequests([baseBidRequest], bidderRequest).data) + expect(payload.tmax).to.equal(3000) + }) + it('includes the ad unit code in the request', function() { const impression = payload.imp[0] expect(impression.adunitcode).to.equal('adunit-code')