From 6cbfdbce2d0f1b567b6a6d6f637fe2a476980acc Mon Sep 17 00:00:00 2001 From: Vincent Schippefilt Date: Thu, 12 Dec 2019 09:44:51 +0000 Subject: [FIX] mail: Timer(s) tests nondeterministic behavior Timer test relies on setTimeout(..., 0) for its execution and its verification. However it seems that in the browser there is *not always* a guarantee that 2 setTimeout(...,0) will execute in a specific order. Delaying the verification by 1 ms : setTimeout(..., 1) should force the order of execution. closes odoo/odoo#41732 Signed-off-by: VincentSchippefilt --- addons/mail/static/src/js/models/utils/timer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/mail/static/src/js/models/utils/timer.js') diff --git a/addons/mail/static/src/js/models/utils/timer.js b/addons/mail/static/src/js/models/utils/timer.js index a3236fd1a16..9aaae471d2d 100644 --- a/addons/mail/static/src/js/models/utils/timer.js +++ b/addons/mail/static/src/js/models/utils/timer.js @@ -13,7 +13,7 @@ var Timer = Class.extend({ * initialization (@see start method). * * @param {Object} params - * @param {integer} params.duration duration of timer before timeout in + * @param {number} params.duration duration of timer before timeout in * milli-seconds. * @param {function} params.onTimeout function that is called when the * timer times out. -- cgit v1.2.3