diff --git a/lib/mnesia_repo.ex b/lib/mnesia_repo.ex index ce3e37a..ee371c9 100644 --- a/lib/mnesia_repo.ex +++ b/lib/mnesia_repo.ex @@ -109,21 +109,23 @@ defmodule MishkaInstaller.MnesiaRepo do end @impl true - def handle_info(:health_check, state) do - # TODO: this function can have some checker - Process.send_after(__MODULE__, :health_check, 1000) + if Mix.env() != :test do + def handle_info(:health_check, state) do + # TODO: this function can have some checker + Process.send_after(__MODULE__, :health_check, 1000) - try do MishkaInstaller.broadcast("mnesia", Map.get(state, :status), %{ identifier: :mishka_mnesia_repo, local_tables: :mnesia.system_info(:local_tables), schemas: schemas() }) - rescue - _ -> nil - end - {:noreply, state} + {:noreply, state} + end + else + def handle_info(:health_check, state) do + {:noreply, state} + end end def handle_info(info, state) do