Fix tests broken by rebase

pull/218/head
Luke Imhoff 7 years ago
parent 8d5f799548
commit a9944fb82d
  1. 9
      apps/explorer/test/explorer/indexer/address_balance_fetcher_test.exs
  2. 1
      apps/explorer/test/explorer/indexer/block_fetcher_test.exs
  3. 8
      apps/explorer/test/support/indexer/address_balance_fetcher_case.ex

@ -4,13 +4,19 @@ defmodule Explorer.Indexer.AddressBalanceFetcherTest do
use Explorer.DataCase, async: false
alias Explorer.Chain.Address
alias Explorer.Indexer.{AddressBalanceFetcher, AddressBalanceFetcherCase, InternalTransactionFetcherCase}
alias Explorer.Indexer.{AddressBalanceFetcher, AddressBalanceFetcherCase}
@hash %Explorer.Chain.Hash{
byte_count: 20,
bytes: <<139, 243, 141, 71, 100, 146, 144, 100, 242, 212, 211, 165, 101, 32, 167, 106, 179, 223, 65, 91>>
}
setup do
start_supervised!({Task.Supervisor, name: Explorer.Indexer.TaskSupervisor})
:ok
end
describe "init/1" do
test "fetches unfetched addresses" do
unfetched_address = insert(:address, hash: @hash)
@ -19,7 +25,6 @@ defmodule Explorer.Indexer.AddressBalanceFetcherTest do
assert unfetched_address.balance_fetched_at == nil
AddressBalanceFetcherCase.start_supervised!()
InternalTransactionFetcherCase.start_supervised!()
fetched_address =
wait(fn ->

@ -8,6 +8,7 @@ defmodule Explorer.Indexer.BlockFetcherTest do
alias Explorer.Indexer
alias Explorer.Indexer.{
AddressBalanceFetcher,
AddressBalanceFetcherCase,
BlockFetcher,
InternalTransactionFetcher,

@ -3,7 +3,13 @@ defmodule Explorer.Indexer.AddressBalanceFetcherCase do
def start_supervised!(options \\ []) when is_list(options) do
options
|> Keyword.put(:name, AddressBalanceFetcher)
|> Keyword.merge(
flush_interval: 50,
init_chunk_size: 1,
max_batch_size: 1,
max_concurrency: 1,
name: AddressBalanceFetcher
)
|> AddressBalanceFetcher.child_spec()
|> ExUnit.Callbacks.start_supervised!()
end

Loading…
Cancel
Save