Skip to content

Commit ee6ed75

Browse files
michallepickijosevalim
authored andcommitted
Update Mix.TasksTestTest for Erlang/OTP 25 (#11637)
The order in which tests get executed can be different depending on Erlang/OTP version The test failure was: 1) test logs and errors umbrella with file path (Mix.Tasks.TestTest) test/mix/tasks/test_test.exs:432 Assertion with =~ failed code: assert mix(["test", "apps/unknown_app/test"]) =~ "==> bar\nPaths given to \"mix test\" did not match any directory/file: apps/unknown_app/test\n==> foo\nPaths given to \"mix test\" did not match any directory/file: apps/unknown_app/test\n" left: "==> foo\nCompiling 1 file (.ex)\nGenerated foo app\n==> bar\nCompiling 1 file (.ex)\nGenerated bar app\n==> foo\nPaths given to \"mix test\" did not match any directory/file: apps/unknown_app/test\n==> bar\nPaths given to \"mix test\" did not match any directory/file: apps/unknown_app/test\n" right: "==> bar\nPaths given to \"mix test\" did not match any directory/file: apps/unknown_app/test\n==> foo\nPaths given to \"mix test\" did not match any directory/file: apps/unknown_app/test\n" stacktrace: test/mix/tasks/test_test.exs:436: anonymous fn/0 in Mix.Tasks.TestTest."test logs and errors umbrella with file path"/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/tasks/test_test.exs:433: (test)
1 parent bb17204 commit ee6ed75

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/mix/test/mix/tasks/test_test.exs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,9 +433,14 @@ defmodule Mix.Tasks.TestTest do
433433
in_fixture("umbrella_test", fn ->
434434
# Run false positive test first so at least the code is compiled
435435
# and we can perform more aggressive assertions later
436-
assert mix(["test", "apps/unknown_app/test"]) =~ """
436+
output = mix(["test", "apps/unknown_app/test"])
437+
438+
assert output =~ """
437439
==> bar
438440
Paths given to "mix test" did not match any directory/file: apps/unknown_app/test
441+
"""
442+
443+
assert output =~ """
439444
==> foo
440445
Paths given to "mix test" did not match any directory/file: apps/unknown_app/test
441446
"""

0 commit comments

Comments
 (0)