Fix further flakiness in challenge tests on CI
This commit is contained in:
parent
d28678dbf9
commit
a3693a7f4a
1 changed files with 4 additions and 4 deletions
|
@ -325,18 +325,18 @@ describe('ChallengeHandler', () => {
|
|||
it('should not retry more than 5 times', async () => {
|
||||
const handler = await createHandler();
|
||||
|
||||
const one = createMessage('1');
|
||||
const one = createMessage('1', { retryAfter: IMMEDIATE_RETRY });
|
||||
const retrySend = sinon.stub(one, 'retrySend');
|
||||
|
||||
messageStorage.set('1', one);
|
||||
await handler.register(one);
|
||||
|
||||
const retrySend = sinon.stub(one, 'retrySend');
|
||||
|
||||
assert.isTrue(isInStorage(one.id));
|
||||
assert.deepEqual(sent, []);
|
||||
assert.equal(challengeStatus, 'required');
|
||||
|
||||
// Let it spam the server.
|
||||
await sleep(DEFAULT_RETRY_AFTER + LEEWAY);
|
||||
await sleep(LEEWAY);
|
||||
|
||||
assert.isTrue(isInStorage(one.id));
|
||||
assert.deepEqual(sent, []);
|
||||
|
|
Loading…
Reference in a new issue