Skip to content

Commit fac9c18

Browse files
authored
fix(e2e): fix "eventually" helper in e2e tests (#3917)
1 parent 1675f42 commit fac9c18

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

features/extra/helpers.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,15 @@ module.exports = {
4040
if (!options.backoff) options.backoff = 500;
4141
if (!options.maxTime) options.maxTime = 5;
4242

43-
const delay = options.delay;
44-
//TODO: apply clock offset
45-
const started = new Date();
43+
let delay = options.delay;
44+
const started = Date.now();
4645

4746
const self = this;
4847
const retry = function () {
4948
callback();
5049
};
5150
retry.fail = function (err) {
52-
const now = self.AWS.util.date.getDate();
51+
const now = Date.now();
5352
if (now - started < options.maxTime * 1000) {
5453
setTimeout(function () {
5554
delay += options.backoff;

features/sqs/step_definitions/queues.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Then("list queues should eventually return the queue urls", function (callback)
2323
}
2424
return matchingCount == this.createdQueues.length;
2525
};
26+
2627
this.request(null, "listQueues", {}, next);
2728
},
2829
{ maxTime: 60 }

0 commit comments

Comments
 (0)