Skip to content

Commit f809d03

Browse files
michallepickijosevalim
authored andcommitted
Update Mix.DepTest for Erlang/OTP 25 (#11636)
:digraph_utils.topsort/1 can return a different (but also valid) topological ordering The test failure on Erlang/OTP 25.0-rc1 was: 1) test deps_paths (Mix.DepTest) test/mix/dep_test.exs:491 Assertion with == failed code: assert Enum.map(Mix.Dep.load_on_environment([]), & &1.app) == [:git_repo, :abc_repo, :deps_repo] left: [:abc_repo, :git_repo, :deps_repo] right: [:git_repo, :abc_repo, :deps_repo] stacktrace: test/mix/dep_test.exs:499: anonymous fn/0 in Mix.DepTest."test deps_paths"/1 (elixir 1.14.0-dev) lib/file.ex:1555: File.cd!/2 test/test_helper.exs:127: MixTest.Case.in_fixture/3 test/mix/dep_test.exs:31: Mix.DepTest.with_deps/2 test/mix/dep_test.exs:497: (test)
1 parent ee6ed75 commit f809d03

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/mix/test/mix/dep_test.exs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -496,8 +496,11 @@ defmodule Mix.DepTest do
496496

497497
with_deps(deps, fn ->
498498
in_fixture("deps_status", fn ->
499-
assert Enum.map(Mix.Dep.load_on_environment([]), & &1.app) ==
500-
[:git_repo, :abc_repo, :deps_repo]
499+
# Both orders below are valid after topological sort
500+
assert Enum.map(Mix.Dep.load_on_environment([]), & &1.app) in [
501+
[:git_repo, :abc_repo, :deps_repo],
502+
[:abc_repo, :git_repo, :deps_repo]
503+
]
501504

502505
assert Map.keys(Mix.Project.deps_paths()) == [:abc_repo, :deps_repo, :git_repo]
503506

0 commit comments

Comments
 (0)