1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-08-09 10:22:46 +03:00

increase timeout on flush to fix failing unit test

also remove unused requests
This commit is contained in:
Hubert Chathi
2019-11-28 16:53:21 -05:00
parent a6f7936311
commit 59b25d6837

View File

@@ -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(