[erlang-bugs] EUnit treats a process that kills itself as a successful test

John Hughes <>
Wed Dec 31 15:04:49 CET 2008

Here's my code:


exit_test() ->

In the shell, I run:

1> c(eunit_example).
2> eunit_example:test().
  Test successful.

Is that really the intention?

Likewise, this test passes:

spawn_test() ->

(The sleep is there to allow time for the child process to die, and the exit signal to be propagated).

Presumably the process running the test is trapping exits--but is that really appropriate? As in this last example, crashes in child processes won't cause the test to fail.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20081231/5eb2fffe/attachment.html>

More information about the erlang-bugs mailing list