From a3693a7f4ad30bb6ce4a24f4fd09a7029ca5bcc3 Mon Sep 17 00:00:00 2001 From: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com> Date: Fri, 7 May 2021 15:36:28 -0700 Subject: [PATCH] Fix further flakiness in challenge tests on CI --- ts/test-both/challenge_test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ts/test-both/challenge_test.ts b/ts/test-both/challenge_test.ts index 671d06eab..fb6ede856 100644 --- a/ts/test-both/challenge_test.ts +++ b/ts/test-both/challenge_test.ts @@ -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, []);