From 59b25d6837483ff681c2cb349ff8db871c396543 Mon Sep 17 00:00:00 2001 From: Hubert Chathi Date: Thu, 28 Nov 2019 16:53:21 -0500 Subject: [PATCH] increase timeout on flush to fix failing unit test also remove unused requests --- spec/unit/crypto/verification/sas.spec.js | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/spec/unit/crypto/verification/sas.spec.js b/spec/unit/crypto/verification/sas.spec.js index 3c9aa666e..5511c6652 100644 --- a/spec/unit/crypto/verification/sas.spec.js +++ b/spec/unit/crypto/verification/sas.spec.js @@ -275,9 +275,7 @@ describe("SAS verification", function() { expect(aliceDevice.isVerified()).toBeTruthy(); }); - // TODO: Turn this test back on by fixing it. - // See https://github.com/vector-im/riot-web/issues/11545 and related issues. - xit("should verify a cross-signing key", async () => { + it("should verify a cross-signing key", async () => { alice.httpBackend.when('POST', '/keys/device_signing/upload').respond( 200, {}, ); @@ -296,33 +294,17 @@ describe("SAS verification", function() { }, ); - alice.httpBackend.when('POST', '/keys/query').respond(200, { - failures: {}, - device_keys: { - "@bob:example.com": BOB_DEVICES, - }, - }); - bob.httpBackend.when('POST', '/keys/query').respond(200, { - failures: {}, - device_keys: { - "@alice:example.com": ALICE_DEVICES, - }, - }); - const verifyProm = Promise.all([ aliceVerifier.verify(), bobPromise.then((verifier) => { bob.httpBackend.when( 'POST', '/keys/signatures/upload', ).respond(200, {}); - bob.httpBackend.flush(undefined, 2); + bob.httpBackend.flush(undefined, 1, 2000); return verifier.verify(); }), ]); - await alice.httpBackend.flush(undefined, 1); - console.log("alice reqs flushed"); - await verifyProm; const bobDeviceTrust = alice.client.checkDeviceTrust(