Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions test/socket_can/writer_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,14 @@ defmodule SocketCAN.WriterTest do
} end, name: :mock_socket_state)

on_exit(fn ->
if Process.whereis(:mock_socket_state) do
Agent.stop(:mock_socket_state)
if pid = Process.whereis(:mock_socket_state) do
if Process.alive?(pid) do
try do
Agent.stop(:mock_socket_state, :normal, 100)
catch
:exit, _ -> :ok
end
end
end
end)

Expand Down