Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dgkeyword RTD provider: fix tests causing ID5 test failures #8862

Merged
merged 1 commit into from
Aug 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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