Skip to content

Commit

Permalink
Do not flip async/sync modules in --repeat-until-failure
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed Jun 15, 2024
1 parent 1c17f1e commit ace841f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ex_unit/lib/ex_unit.ex
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ defmodule ExUnit do

defp maybe_repeated_run(options, seed, load_us, repeat) do
case ExUnit.Runner.run(options, load_us) do
{%{failures: 0}, {sync_modules, async_modules}}
{%{failures: 0}, {async_modules, sync_modules}}

This comment has been minimized.

Copy link
@SteffenDE

SteffenDE Jun 15, 2024

Contributor

good catch!

This comment has been minimized.

Copy link
@SteffenDE

SteffenDE Jun 15, 2024

Contributor

this actually fixes very weird issues I already found in phoenix using repeat-until-failure, but did not have the time to further look into yet. Multiple async tests changing the working dir leads to expected problems 😃

when repeat > 0 and (sync_modules != [] or async_modules != []) ->
ExUnit.Server.restore_modules(async_modules, sync_modules)

Expand Down

0 comments on commit ace841f

Please sign in to comment.