On Wed, Dec 17, 2014 at 1:56 PM, Daniel Holbert <dholb...@mozilla.com> wrote:
> On 12/17/2014 01:27 PM, Martijn wrote:
>> What about where setTimeout is used as a fallback for when some event
>> failed to fire and the mochitest is stalled and the setTimeout is then
>> used to finish the mochitest on time and give some useful debug info?
>
> This exact scenario was called out in the initial message on this
> thread, as a legitimate reasons to use setTimeout, and with instructions
> on what to do. Quoting ehsan:

Sorry, I got the thought that the usage of requestFlakyTimeout was
wrong at all times.
I guess it's only wrong when the comment inside it tells you that it's
not legitimite usage.

Regards,
Martijn

>> On Fri, Dec 12, 2014 at 10:34 AM, Ehsan Akhgari <ehsan.akhg...@gmail.com> 
>> wrote:
>>> * If you have a legitimate reason for using timeouts like this (such as if
>>> your test needs to wait a bit to make sure an event doesn't happen in the
>>> future, and there is no other way of checking that), you should call
>>> SimpleTest.requestFlakyTimeout("reason");.  The argument to the function is
>>> a string which is meant to document why you need to use these kinds of
>>> timeouts, and why that doesn't lead into intermittent test failures.
>
> ~Daniel
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to