File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -440,6 +440,7 @@ defmodule ExUnit.Runner do
440440 context
441441 ) do
442442 spawn_monitor ( fn ->
443+ Process . set_label ( { test . case , test . name } )
443444 ExUnit.OnExitHandler . register ( self ( ) )
444445 generate_test_seed ( seed , test , rand_algorithm )
445446 context = context |> Map . merge ( test . tags ) |> Map . put ( :test_pid , self ( ) )
Original file line number Diff line number Diff line change @@ -1234,6 +1234,14 @@ defmodule ExUnitTest do
12341234 end
12351235 end
12361236
1237+ test "sets process label for each test" do
1238+ # TODO: Remove check once we support Erlang/OTP 27+
1239+ if function_exported? ( :proc_lib , :get_label , 1 ) do
1240+ label = apply ( :proc_lib , :get_label , [ self ( ) ] )
1241+ assert label == { ExUnitTest , :"test sets process label for each test" }
1242+ end
1243+ end
1244+
12371245 defp configure_and_reload_on_exit ( opts ) do
12381246 old_opts = ExUnit . configuration ( )
12391247
You can’t perform that action at this time.
0 commit comments