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 @@ -435,6 +435,7 @@ defmodule ExUnit.Runner do
435435 context
436436 ) do
437437 spawn_monitor ( fn ->
438+ Process . set_label ( { test . case , test . name } )
438439 ExUnit.OnExitHandler . register ( self ( ) )
439440 generate_test_seed ( seed , test , rand_algorithm )
440441 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