We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9431338 commit 0b38bc0Copy full SHA for 0b38bc0
lib/ex_unit/lib/ex_unit/runner.ex
@@ -159,6 +159,7 @@ defmodule ExUnit.Runner do
159
{test_case, pending} =
160
receive do
161
{^case_pid, :case_finished, test_case, tests} ->
162
+ Process.demonitor(case_ref, [:flush])
163
{test_case, tests}
164
{:DOWN, ^case_ref, :process, ^case_pid, error} ->
165
test_case = %{test_case | state: {:failed, {{:EXIT, case_pid}, error, []}}}
@@ -213,12 +214,14 @@ defmodule ExUnit.Runner do
213
214
test =
215
216
{^test_pid, :test_finished, test} ->
217
+ Process.demonitor(test_ref, [:flush])
218
test
219
{:DOWN, ^test_ref, :process, ^test_pid, error} ->
220
%{test | state: {:failed, {{:EXIT, test_pid}, error, []}}}
221
after
222
timeout ->
223
Process.exit(test_pid, :kill)
224
225
%{test | state: {:failed, {:error, %ExUnit.TimeoutError{timeout: timeout}, []}}}
226
end
227
0 commit comments