From 76dba5558e77dafcb8415a186c9f48221d7bee30 Mon Sep 17 00:00:00 2001 From: Argonus <9743549+Argonus@users.noreply.github.com> Date: Tue, 3 Dec 2024 08:18:59 +0100 Subject: [PATCH] Fix package --- mix.exs | 5 +++++ test/support/telemetry.ex | 4 +--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/mix.exs b/mix.exs index 7ae1fdc..731105c 100644 --- a/mix.exs +++ b/mix.exs @@ -19,6 +19,11 @@ defmodule Cluster.Mixfile do docs: docs(), deps: deps(), elixirc_paths: elixirc_paths(Mix.env()), + test_coverage: [ + summary: [ + threshold: 60 + ] + ], dialyzer: [ flags: ~w(-Wunmatched_returns -Werror_handling -Wrace_conditions -Wno_opaque -Wunderspecs) ], diff --git a/test/support/telemetry.ex b/test/support/telemetry.ex index d4ada00..f213800 100644 --- a/test/support/telemetry.ex +++ b/test/support/telemetry.ex @@ -1,8 +1,6 @@ defmodule Cluster.Telemetry do @moduledoc false - use ExUnit.Case - def setup_telemetry(event) do telemetry_handle_id = "test-telemetry-handler-#{inspect(self())}" @@ -16,7 +14,7 @@ defmodule Cluster.Telemetry do nil ) - :ok = on_exit(fn -> :telemetry.detach(telemetry_handle_id) end) + :ok = ExUnit.Callbacks.on_exit(fn -> :telemetry.detach(telemetry_handle_id) end) end defp send_to_pid(event, measurements, metadata, config) do