From 2111d2ba31722c67d08546c92af3114c23263050 Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Thu, 11 Jul 2019 12:21:50 +0300 Subject: [PATCH] setup rolling window tests --- .../test/ethereum_jsonrpc/rolling_window_test.exs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/ethereum_jsonrpc/test/ethereum_jsonrpc/rolling_window_test.exs b/apps/ethereum_jsonrpc/test/ethereum_jsonrpc/rolling_window_test.exs index 25b7e41382..43f400434a 100644 --- a/apps/ethereum_jsonrpc/test/ethereum_jsonrpc/rolling_window_test.exs +++ b/apps/ethereum_jsonrpc/test/ethereum_jsonrpc/rolling_window_test.exs @@ -10,7 +10,10 @@ defmodule EthereumJSONRPC.RollingWindowTest do setup do # We set `window_length` to a large time frame so that we can sweep manually to simulate # time passing - RollingWindow.start_link([table: @table, duration: :timer.minutes(120), window_count: 3], name: RollingWindow) + {:ok, pid} = + RollingWindow.start_link([table: @table, duration: :timer.minutes(120), window_count: 3], name: RollingWindow) + + on_exit(fn -> Process.exit(pid, :normal) end) :ok end