diff --git a/lib/statsig_ex.ex b/lib/statsig_ex.ex index 76ab32a..670e248 100644 --- a/lib/statsig_ex.ex +++ b/lib/statsig_ex.ex @@ -117,7 +117,7 @@ defmodule StatsigEx do def handle_call({:log, event}, _from, state), do: {:reply, :ok, Map.put(state, :events, [event | state.events])} - def handle_info({:log, event}, state), + def handle_cast({:log, event}, state), do: {:noreply, Map.put(state, :events, [event | state.events])} def handle_info( diff --git a/test/support/test_generator.ex b/test/support/test_generator.ex index 0f32d59..c2317eb 100644 --- a/test/support/test_generator.ex +++ b/test/support/test_generator.ex @@ -36,6 +36,8 @@ defmodule StatsigEx.TestGenerator do case unquote(type) do :gate -> + # maybe give us some time to actually spit out logs? + StatsigEx.check_gate(unquote(Macro.escape(user)), unquote(name), :test) assert unquote(Macro.escape(expected)) == result.result _ ->