From a459675329a203de6e86b25f91b611ce08016dfb Mon Sep 17 00:00:00 2001 From: Steven Luscher Date: Thu, 25 Jul 2024 22:04:55 -0700 Subject: [PATCH] Increase timeout of test involving key generation because GitHub Actions runner is really slow (#2987) --- .../addresses/src/__tests__/public-key-test.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/packages/addresses/src/__tests__/public-key-test.ts b/packages/addresses/src/__tests__/public-key-test.ts index 34d38fb7374a..8f00fb859f09 100644 --- a/packages/addresses/src/__tests__/public-key-test.ts +++ b/packages/addresses/src/__tests__/public-key-test.ts @@ -57,11 +57,15 @@ describe('getAddressFromPublicKey', () => { }) as RsaHashedKeyGenParams, ), ), - ])('throws when called with a $name/$__variant public key', async algorithm => { - expect.assertions(1); - const { publicKey } = await crypto.subtle.generateKey(algorithm, true, ['sign', 'verify']); - await expect(() => getAddressFromPublicKey(publicKey)).rejects.toThrow(); - }); + ])( + 'throws when called with a $name/$__variant public key', + async algorithm => { + expect.assertions(1); + const { publicKey } = await crypto.subtle.generateKey(algorithm, true, ['sign', 'verify']); + await expect(() => getAddressFromPublicKey(publicKey)).rejects.toThrow(); + }, + 10_000 /* Increase `timeout` to 10 seconds; GitHub Actions runner is really slow. */, + ); it('throws when called with a private key', async () => { expect.assertions(1); const mockPrivateKey = await crypto.subtle.importKey(