Another possible source of flakiness is the use of small timeouts in tests, like 0.1 or even 0.01 seconds. Making the timeouts larger makes the tests run slower, but the short timeouts occasionally flake out. There should be other ways to wait for certain things to happen in most cases, like creating an Event object and awaiting that, instead of sleeping.
Longer timeouts (e.g. 1, 2 or 3 seconds) are less likely to be suspicious, timeouts like that are meant to be never hit unless the test is actually failing. Making these too long would just cause tests to take longer to report failure.
sobolevn commentedSep 25, 2022
Openning as proposed in #97535 (comment)
We had multiple issues with
test_asyncio
before. Some tests are changing env, some are just flaky:threading._dangling
without MainThread before some tests #91676It is proposed to analyze what is causing this to happen again and again.
And fix it, of course :)
The text was updated successfully, but these errors were encountered: