From 5d3a2268b054dc0334843f8f7f4ffeffc5f981f2 Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Tue, 18 Jun 2019 15:37:34 +0300 Subject: [PATCH] fix tests --- .../test/explorer/market/market_history_cache_test.exs | 6 ++++++ apps/explorer/test/explorer/market/market_test.exs | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/apps/explorer/test/explorer/market/market_history_cache_test.exs b/apps/explorer/test/explorer/market/market_history_cache_test.exs index 77cf2b3c88..1421d75214 100644 --- a/apps/explorer/test/explorer/market/market_history_cache_test.exs +++ b/apps/explorer/test/explorer/market/market_history_cache_test.exs @@ -7,6 +7,12 @@ defmodule Explorer.Market.MarketHistoryCacheTest do setup do Supervisor.terminate_child(Explorer.Supervisor, {ConCache, MarketHistoryCache.cache_name()}) Supervisor.restart_child(Explorer.Supervisor, {ConCache, MarketHistoryCache.cache_name()}) + + on_exit(fn -> + Supervisor.terminate_child(Explorer.Supervisor, {ConCache, Explorer.Chain.BlocksCache.cache_name()}) + Supervisor.restart_child(Explorer.Supervisor, {ConCache, Explorer.Chain.BlocksCache.cache_name()}) + end) + :ok end diff --git a/apps/explorer/test/explorer/market/market_test.exs b/apps/explorer/test/explorer/market/market_test.exs index b639e2f1cf..1dd03067ec 100644 --- a/apps/explorer/test/explorer/market/market_test.exs +++ b/apps/explorer/test/explorer/market/market_test.exs @@ -9,6 +9,11 @@ defmodule Explorer.MarketTest do Supervisor.terminate_child(Explorer.Supervisor, {ConCache, Explorer.Chain.BlocksCache.cache_name()}) Supervisor.restart_child(Explorer.Supervisor, {ConCache, Explorer.Chain.BlocksCache.cache_name()}) + on_exit(fn -> + Supervisor.terminate_child(Explorer.Supervisor, {ConCache, Explorer.Chain.BlocksCache.cache_name()}) + Supervisor.restart_child(Explorer.Supervisor, {ConCache, Explorer.Chain.BlocksCache.cache_name()}) + end) + :ok end