Test that duplicate address hashes only retry max block number

pull/310/head
Luke Imhoff 7 years ago
parent c7a80fb75b
commit 8c23f7b54c
  1. 21
      apps/explorer/test/explorer/indexer/address_balance_fetcher_test.exs
  2. 2
      coveralls.json

@ -86,9 +86,28 @@ defmodule Explorer.Indexer.AddressBalanceFetcherTest do
fetched_address = Repo.one!(from(address in Address, where: address.hash == ^hash_data))
assert fetched_address.fetched_balance == %Explorer.Chain.Wei{value: Decimal.new(252460802000000000000000000)}
assert fetched_address.fetched_balance == %Explorer.Chain.Wei{
value: Decimal.new(252_460_802_000_000_000_000_000_000)
}
assert fetched_address.fetched_balance_block_number == 2
end
test "duplicate address hashes only retry max block_quantity" do
hash_data = "0x000000000000000000000000000000000"
assert AddressBalanceFetcher.run(
[%{block_quantity: "0x1", hash_data: hash_data}, %{block_quantity: "0x2", hash_data: hash_data}],
0
) ==
{:retry,
[
%{
block_quantity: "0x2",
hash_data: "0x000000000000000000000000000000000"
}
]}
end
end
defp wait(producer) do

@ -1,7 +1,7 @@
{
"coverage_options": {
"treat_no_relevant_lines_as_covered": true,
"minimum_coverage": 93.1
"minimum_coverage": 93.9
},
"terminal_options": {
"file_column_width": 120

Loading…
Cancel
Save