diff --git a/lib/plugins/aws/provider/awsProvider.test.js b/lib/plugins/aws/provider/awsProvider.test.js index 1cf09dbf2..67296ffcc 100644 --- a/lib/plugins/aws/provider/awsProvider.test.js +++ b/lib/plugins/aws/provider/awsProvider.test.js @@ -255,7 +255,10 @@ describe('AwsProvider', () => { describe('#request()', () => { beforeEach(() => { - sinon.stub(global, 'setTimeout', (cb) => { cb(); }); + const originalSetTimeout = setTimeout; + sinon.stub(global, 'setTimeout', (cb, timeout) => { + return originalSetTimeout(cb, Math.min(timeout || 0, 10)); + }); }); afterEach(() => {