Fix flaky tests

Don't match against `Statistics.fetch()` since the `%Statistics{}` from
`Server.init` was previously changed to be empty to prevent `Statistics.fetch`
from timing out `init` and killing the whole supervision tree and then
VM.
pull/188/head
Luke Imhoff 7 years ago
parent 6624773438
commit 0207ad8d66
  1. 4
      apps/explorer/test/explorer/chain/statistics/server_test.exs

@ -14,13 +14,13 @@ defmodule Explorer.Chain.Statistics.ServerTest do
test "returns a new chain when not told to refresh" do test "returns a new chain when not told to refresh" do
{:ok, statistics} = Server.init(refresh: false) {:ok, statistics} = Server.init(refresh: false)
assert statistics.number == Statistics.fetch().number assert statistics == %Statistics{}
end end
test "returns a new chain when told to refresh" do test "returns a new chain when told to refresh" do
{:ok, statistics} = Server.init(refresh: true) {:ok, statistics} = Server.init(refresh: true)
assert statistics == Statistics.fetch() assert statistics == %Statistics{}
end end
test "refreshes when told to refresh" do test "refreshes when told to refresh" do

Loading…
Cancel
Save