From e10e4b0eab4e0fea3d4c66cfdc9ef67f57df4a3a Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Wed, 3 Apr 2019 14:37:03 +0200 Subject: [PATCH] nicer output, comment --- src/scenarios/e2e-encryption.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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});