diff --git a/src/scenarios/e2e-encryption.js b/src/scenarios/e2e-encryption.js index c7a6a5d085..29b97f2047 100644 --- a/src/scenarios/e2e-encryption.js +++ b/src/scenarios/e2e-encryption.js @@ -39,9 +39,10 @@ module.exports = async function e2eEncryptionScenarios(alice, bob) { bob.log.step(`starts SAS verification with ${alice.username}`); const bobSasPromise = startSasVerifcation(bob, alice.username); const aliceSasPromise = acceptSasVerification(alice, bob.username); + // wait in parallel, so they don't deadlock on each other const [bobSas, aliceSas] = await Promise.all([bobSasPromise, aliceSasPromise]); assert.deepEqual(bobSas, aliceSas); - bob.log.done(`done, (${bobSas.join(", ")}) matches!`); + bob.log.done(`done (match for ${bobSas.join(", ")})`); const aliceMessage = "Guess what I just heard?!" await sendMessage(alice, aliceMessage); await receiveMessage(bob, {sender: "alice", body: aliceMessage, encrypted: true});