Skip to content

Commit

Permalink
dgkeyword RTD provider: fix tests causing ID5 test failures (prebid#8862
Browse files Browse the repository at this point in the history
)
  • Loading branch information
dgirardi authored and jorgeluisrocha committed May 18, 2023
1 parent fbe9c91 commit 4b36b74
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions modules/dgkeywordRtdProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ export function getDgKeywordsAndSet(reqBidsConfigObj, callback, moduleConfig, us
const timeout = (moduleConfig && moduleConfig.params && moduleConfig.params.timeout && Number(moduleConfig.params.timeout) > 0) ? Number(moduleConfig.params.timeout) : PROFILE_TIMEOUT_MS;
const url = (moduleConfig && moduleConfig.params && moduleConfig.params.url) ? moduleConfig.params.url : URL + encodeURIComponent(window.location.href);
const adUnits = reqBidsConfigObj.adUnits || getGlobal().adUnits;
callback = (function(cb) {
let done = false;
return function () {
if (!done) {
done = true;
return cb.apply(this, arguments);
}
}
})(callback);
let isFinish = false;
logMessage('[dgkeyword sub module]', adUnits, timeout);
let setKeywordTargetBidders = getTargetBidderOfDgKeywords(adUnits);
Expand Down
2 changes: 1 addition & 1 deletion test/spec/modules/dgkeywordRtdProvider_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,8 @@ describe('Digital Garage Keyword Module', function () {
moduleConfig,
null
);
const request = server.requests[0];
setTimeout(() => {
const request = server.requests[0];
if (request) {
request.respond(
200,
Expand Down

0 comments on commit 4b36b74

Please sign in to comment.