Skip to content

Commit c8f6c4d

Browse files
authored
Increase crypto test timeout (#3500)
For some reason, some tests seem to be timing out in GHA. Let's try bumping up the timeout.
1 parent e8c89e9 commit c8f6c4d

File tree

1 file changed

+27
-23
lines changed

1 file changed

+27
-23
lines changed

spec/integ/crypto/crypto.spec.ts

+27-23
Original file line numberDiff line numberDiff line change
@@ -530,32 +530,36 @@ describe.each(Object.entries(CRYPTO_BACKENDS))("crypto (%s)", (backend: string,
530530
};
531531
}
532532

533-
beforeEach(async () => {
534-
// anything that we don't have a specific matcher for silently returns a 404
535-
fetchMock.catch(404);
536-
fetchMock.config.warnOnFallback = false;
537-
538-
const homeserverUrl = "https://alice-server.com";
539-
aliceClient = createClient({
540-
baseUrl: homeserverUrl,
541-
userId: "@alice:localhost",
542-
accessToken: "akjgkrgjs",
543-
deviceId: "xzcvb",
544-
});
533+
beforeEach(
534+
async () => {
535+
// anything that we don't have a specific matcher for silently returns a 404
536+
fetchMock.catch(404);
537+
fetchMock.config.warnOnFallback = false;
538+
539+
const homeserverUrl = "https://alice-server.com";
540+
aliceClient = createClient({
541+
baseUrl: homeserverUrl,
542+
userId: "@alice:localhost",
543+
accessToken: "akjgkrgjs",
544+
deviceId: "xzcvb",
545+
});
545546

546-
/* set up listeners for /keys/upload and /sync */
547-
keyReceiver = new E2EKeyReceiver(homeserverUrl);
548-
syncResponder = new SyncResponder(homeserverUrl);
547+
/* set up listeners for /keys/upload and /sync */
548+
keyReceiver = new E2EKeyReceiver(homeserverUrl);
549+
syncResponder = new SyncResponder(homeserverUrl);
549550

550-
await initCrypto(aliceClient);
551+
await initCrypto(aliceClient);
551552

552-
// create a test olm device which we will use to communicate with alice. We use libolm to implement this.
553-
await Olm.init();
554-
testOlmAccount = new Olm.Account();
555-
testOlmAccount.create();
556-
const testE2eKeys = JSON.parse(testOlmAccount.identity_keys());
557-
testSenderKey = testE2eKeys.curve25519;
558-
});
553+
// create a test olm device which we will use to communicate with alice. We use libolm to implement this.
554+
await Olm.init();
555+
testOlmAccount = new Olm.Account();
556+
testOlmAccount.create();
557+
const testE2eKeys = JSON.parse(testOlmAccount.identity_keys());
558+
testSenderKey = testE2eKeys.curve25519;
559+
},
560+
/* it can take a while to initialise the crypto library on the first pass, so bump up the timeout. */
561+
10000,
562+
);
559563

560564
afterEach(async () => {
561565
await aliceClient.stopClient();

0 commit comments

Comments
 (0)