<div dir="ltr">This is now also enabled on browser-chrome tests. Bug 1389234 has been filed to track deprecating SimpleTest.requestFlakyTimeout on mochitest-plain and chrome in favour of this new rule.<br><div><br></div><div>-Andrew</div><div><br></div><div><div class="gmail_quote"><div dir="ltr">On Fri, Jul 28, 2017 at 12:02 PM Andrew Halberstadt <<a href="mailto:ahalberstadt@mozilla.com">ahalberstadt@mozilla.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Ah, good to know! I'll file a follow-up to enable the eslint rule on browser/a11y/chrome. Maybe eventually we can just replace the requestFlakyTimeout mechanism with this eslint rule. I decided to punt on that as I'm not sure if eslint is running on 100% of mochitests yet.<br></div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Jul 28, 2017 at 11:56 AM Felipe G <<a href="mailto:felipc@gmail.com" target="_blank">felipc@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>I'll note that requestFlakyTimeout is only enabled for mochitest-plain at the moment: <a href="http://searchfox.org/mozilla-central/source/testing/mochitest/tests/SimpleTest/SimpleTest.js#666" target="_blank">http://searchfox.org/mozilla-central/source/testing/mochitest/tests/SimpleTest/SimpleTest.js#666</a></div><div>So browser-chrome / a11y / chrome tests are still able to use non-0 timeouts.<br></div><div><br></div><div>Cheers,</div><div>Felipe<br></div><div class="gmail_extra"><br><div class="gmail_quote"></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Jul 28, 2017 at 12:48 PM, Andrew Halberstadt <span dir="ltr"><<a href="mailto:ahalberstadt@mozilla.com" target="_blank">ahalberstadt@mozilla.com</a>></span> wrote:<br></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">As part of a larger effort to reduce oranges, we are starting to lint our<br>
tests for common causes of intermittent failures. One low-hanging fruit is<br>
preventing setTimeout with an arbitrary value (aka non-zero) as opposed to<br>
waiting for an appropriate event. The mochitest harness already prevents<br>
this in the harness itself (SimpleTest.requestFlakyTimeout), so this rule<br>
is only enabled on xpcshell tests for now.<br>
<br>
If you need to use a flaky setTimeout for some reason, you can disable the<br>
rule at the directory level, file level or line level:<br>
<a href="http://eslint.org/docs/user-guide/configuring#configuring-rules" rel="noreferrer" target="_blank">http://eslint.org/docs/user-guide/configuring#configuring-rules</a><br>
<br>
It has been disabled in the following files due to pre-existing violations:<br>
<a href="http://searchfox.org/mozilla-central/search?q=eslint-disable+mozilla%2Fno-arbitrary-setTimeout" rel="noreferrer" target="_blank">http://searchfox.org/mozilla-central/search?q=eslint-disable+mozilla%2Fno-arbitrary-setTimeout</a><br>
<br>
Let me know if you think this should be enabled on any other test suites.<br>
-Andrew<br></blockquote></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
_______________________________________________<br>
dev-platform mailing list<br>
<a href="mailto:dev-platform@lists.mozilla.org" target="_blank">dev-platform@lists.mozilla.org</a><br>
<a href="https://lists.mozilla.org/listinfo/dev-platform" rel="noreferrer" target="_blank">https://lists.mozilla.org/listinfo/dev-platform</a><br>
</blockquote></div><br></div></div>
</blockquote></div></blockquote></div></div></div>