You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-07-30 04:23:07 +03:00
Remove flaky test (#3098)
I introduced a flaky test to confirm that `MegolmEncryption#prepareToEncrypt` didn't block the main thread too much, but it turns out that, when run in varying environments, it tends to fail. The same behavior is guaranteed by the following cancellation test - if the thread is blocked, it can't be cancelled. Signed-off-by: Clark Fischer <clark.fischer@gmail.com> Signed-off-by: Clark Fischer <clark.fischer@gmail.com>
This commit is contained in:
@ -579,15 +579,6 @@ describe("MegolmDecryption", function () {
|
||||
}
|
||||
});
|
||||
|
||||
it("defers before completing", async () => {
|
||||
megolm.prepareToEncrypt(room);
|
||||
// Ensure that `Crypto#checkDeviceTrust` has been called *fewer*
|
||||
// than the full nine times, after yielding once.
|
||||
await sleep(0);
|
||||
const callCount = mockCrypto.checkDeviceTrust.mock.calls.length;
|
||||
expect(callCount).toBeLessThan(9);
|
||||
});
|
||||
|
||||
it("is cancellable", async () => {
|
||||
const stop = megolm.prepareToEncrypt(room);
|
||||
|
||||
|
Reference in New Issue
Block a user