Why are tests that fake a global gen server running asynchronously? :) If they change global state, how can you make sure in the long term, they are not going to affect any other test in the system?
On Fri, Nov 26, 2021 at 2:04 PM Paul Dann <pdgid...@gmail.com> wrote: > I always find it a real shame when I have to turn async off for an ExUnit > test file due to some global state that's shared with a test in only one or > two other test files. What I _really_ want to do is to specify that _these_ > tests shouldn't be run at the same time as _those_ tests. The whole of the > rest of the test suite can be run simultaneously without issue. > > Could we solve the problem by defining exclusion groups, for instance: > > use ExUnit.Case, async: true, async_exclude: [:fakes_a_global_genserver] > > The test file is then guaranteed not to run simultaneously with any files > that provide any of the same atoms in the async_exclude list. > > Paul > > -- > You received this message because you are subscribed to the Google Groups > "elixir-lang-core" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to elixir-lang-core+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elixir-lang-core/f6d66e30-e15c-4de3-a48c-321791a51de4n%40googlegroups.com > <https://groups.google.com/d/msgid/elixir-lang-core/f6d66e30-e15c-4de3-a48c-321791a51de4n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "elixir-lang-core" group. To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-core+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4JKtsOoe2bAZ3kF_2-CX64TEvR_H%2BuCokjhxfUn_zW9nA%40mail.gmail.com.