I’m trying to do something unusual with testing and have to use assert_receive to assert an :EXIT. This works, but I still get a “[error] GenServer #PID<0.x.0> terminating” message in the log. Is it possible to suppress error logging for a specific process?
You can use this: ExUnit.CaptureLog — ExUnit v1.13.4
In addition to what @LostKobrakai suggested, if you want to disable error logging for all your tests, you can use the
capture_log: true option when starting
ExUnit in your
As the docs say, you can also disable/enable this behavior for single tests using tags: ExUnit — ExUnit v1.13.4