--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAOTb1wd7YnjmLwS_Gvvj3iGOx_Oodp7Xv%2BwZb_tCJ2Qmy%2BHO5g%40mail.gmail.com.
I suggest we add the flag as "--random" taking an integer that is the seed, or 0 to disable.
On 10.03.2021., at 13:06, Mariusz Felisiak <felisiak...@gmail.com> wrote:
I suggest we add the flag as "--random" taking an integer that is the seed, or 0 to disable.This kind of APIs are always confusing. Moreover I don't think that changing the current behavior is a good idea, it should be opt-in not opt-out.
I usually agree with new features being opt-in, but perhaps this case is different?If I had tests that are breaking if executed randomly, I’d want to know about it yesterday. IOW, I’m having difficulty imagining a scenario where the user would be thankful for not activating this feature by default. So personally, I’d like to see an opt-out setting for this in settings.py./$0.02Fran
Is the current order defined in any way -- if not one should consider it randoms anyways and as such actually randomizing should not make much of a difference. FWIW I am fine with making it the default and outputting the seed at the end of the run so it can reproduced. I am curious if it finds many remaining issues.
Paths are sorted before being imported so that execution order is the same even if the underlying file system’s ordering is not dependent on file name.
Note: The order in which the various tests will be run is determined by sorting the test method names with respect to the built-in ordering for strings.
... Having randomization in CI might be interesting, but then we probably need a way to derive the salt from the PR number or so, because I think the number of tests inside a PR is small enough that you probably do not see isolation failures, but you really want to see progress in a PR without random failures due to isolation.
But, regardless of the default, to get the full benefit I think you'd want at least one of the test runs in CI to be a random one.
because I think the number of tests inside a PR is small enough that you probably do not see isolation failures, but you really want to see progress in a PR without random failures due to isolation.
It's highly more likely that running tests in reverse order will catch isolation issue for you than running them in a non-deterministic order.
We have to run it as often with as many different seeds as possible to have an effect. The space of tests is so big that I am not sure we'd find something otherwise (though I have to agree that is theoretical thinking I did not try in practice).
--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/4034f3db-e6ee-4d78-b140-553c73c1a170n%40googlegroups.com.