From ce4165780ae500baa3ba30bf96fa7ac6fa4e2a2a Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Wed, 5 Jun 2019 09:08:31 +0000 Subject: [PATCH] [FIX] mail: avoid race condition in test --- addons/mail/static/tests/chatter_tests.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/mail/static/tests/chatter_tests.js b/addons/mail/static/tests/chatter_tests.js index 582448f1bc7..ea6b7adbd8b 100644 --- a/addons/mail/static/tests/chatter_tests.js +++ b/addons/mail/static/tests/chatter_tests.js @@ -1036,6 +1036,8 @@ QUnit.test('chatter: receive notif when document is open', async function (asser assert.strictEqual(thread.getUnreadCounter(), 1, "document thread should now have one unread message"); + // do not destroy form too early. wait rendering to avoid race condition in service call. + await testUtils.nextTick(); form.destroy(); });