From 4d6c5dbf5156a9841ac3924f38195d58ed1e7552 Mon Sep 17 00:00:00 2001 From: Dexter Chua Date: Thu, 3 Sep 2020 08:38:05 +0800 Subject: [PATCH] Avoid triggering #31 in tests This doesn't fix the underlying problem, but it is very helpful for tests to not randomly fail for reasons that have nothing to do with the commit. --- src/tests/01-sync.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/tests/01-sync.ts b/src/tests/01-sync.ts index 61c14e3e..d755a474 100644 --- a/src/tests/01-sync.ts +++ b/src/tests/01-sync.ts @@ -199,8 +199,11 @@ test('Leave mattermost team when all channels left', async t => { // are processed. We don't check it because the bridge will be killed after // this. await Promise.all([ - waitEvent(main(), 'matrix', 2), + waitEvent(main(), 'matrix'), matrixClient.leave(MATRIX_ROOM_IDS['off-topic']), + ]); + await Promise.all([ + waitEvent(main(), 'matrix'), matrixClient.leave(MATRIX_ROOM_IDS['town-square']), ]); @@ -216,8 +219,11 @@ test('Leave mattermost team when all channels left', async t => { ); await Promise.all([ - waitEvent(main(), 'matrix', 2), + waitEvent(main(), 'matrix'), matrixClient.joinRoom(MATRIX_ROOM_IDS['off-topic']), + ]); + await Promise.all([ + waitEvent(main(), 'matrix'), matrixClient.joinRoom(MATRIX_ROOM_IDS['town-square']), ]);