It’s impossible to know without seeing your code but this generally happens because one test is causing persisting side effects that another test is reading. In the past this was usually the database but Phoenix, and most other frameworks, rollback the db state on each test. Did you turn that off, per chance? Another possibility is that one test is writing a file that another is expecting not to be there. There are a lot of different possibilities but that’s the gist of it.
Yes I would think they are side effects, because the error it generates can be described as: “it is not reached to send the Task.async therefore no such tasks exist and the test fails”, I have separated the tests that handle Task.async to another describe with a different setup and that works for now for me, thank you very much for the general context of the problem.
P.S: I have not moved any of the test configuration (rollback question).
Yes, sorry, ideally I would like to have a project with the reproducible bug, right now I solved it by using a different describe with a different setup for the problematic tests (in same file), in a future post I will be sure to follow the steps you recommend, thank you very much.
Agree with @iarekk but my shot in the dark: I know you just said you are using Task.async and send but are you somehow sending to the same named process across tests? That’s all I got without more info.