Open mbuhot opened 6 months ago
Interesting 🤔 I will check it out! thanks!
I think the issue is that --repeat-until-failure [n]
doesn't re-run test/test_helper.exs
. I'm not sure if it really makes sense for Elixir to do that, but maybe it's worth opening an issue or PR.
Not an issue with Elixir. Mimic.copy/1
is calling Mimic.Server.reset/1
in a function passed to ExUnit.after_suite/1
, here.
I think it's safe to just remove that line.
EDIT: I just saw the fix/repeat-until-failure
branch. How embarrassing. Anything holding that back?
@harrisi, you are right that we should be able to essentially avoid the reset if we have repeat-until-failure happening. I don't know why but I'm getting flaky specs on that branch so I parked for a bit! I intend to come back to it soon but if anyone wants to try to understand why and fix it please feel free to!
While trying out the Elixir 1.17 release candidate I noticed that when using the new
--repeat-until-failure
option, the tests run successfully the first time they are executed, but then on the second run the Mimic copies appear to be lost?Console output (partially redacted)
The
DateTime
module is copied in the test_helper.exs:The
stub_utc_now
util function in the stack trace is roughly: