Connection lost
Reconnecting. If you just saved something, check that it saved before trying again.
Server error
Reconnecting to the server. If you just saved something, check that it saved before trying again.
Testing VM shutdown from another BEAM
If the code under test calls System.stop/1, running it in an ExUnit test stops the VM that’s running the suite. Start a second Elixir VM and check its exit status from the test:
test "the child VM shuts down cleanly" do
{output, status} =
System.cmd("elixir", ["--no-halt", "-e", "System.stop(0)"], stderr_to_stdout: true)
assert status == 0, output
end
--no-halt keeps the child running after the expression returns, so it can’t pass just by reaching the end of the script. In Kogen Studio’s shutdown test, the child starts the daemon, sends its stop command over a Unix socket and checks the acknowledgement. ExUnit checks that the VM exited and the socket file is gone.