Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests fail on some versions of elixir #11

Open
ayrat555 opened this issue Apr 16, 2018 · 0 comments
Open

Tests fail on some versions of elixir #11

ayrat555 opened this issue Apr 16, 2018 · 0 comments

Comments

@ayrat555
Copy link
Member

ayrat555 commented Apr 16, 2018

Elixir 1.6.0

 1) doctest MerklePatriciaTree.Trie.Inspector.all_keys/1 (1) (MerklePatriciaTree.Trie.InspectorTest)
     test/trie/inspector_test.exs:3
     Doctest failed: got ArgumentError with message "argument error"
     code: MerklePatriciaTree.Trie.new(MerklePatriciaTree.Test.random_ets_db())
              |> MerklePatriciaTree.Trie.update("type", "fighter")
              |> MerklePatriciaTree.Trie.update("name", "bob")
              |> MerklePatriciaTree.Trie.update("nationality", "usa")
              |> MerklePatriciaTree.Trie.update("nato", "strong")
              |> MerklePatriciaTree.Trie.update((for x <- 1..100, into: <<>>, do: <<x::8>>), (for x <- 1..100, into: <<>>, do: <<x*2::8>>))
              |> MerklePatriciaTree.Trie.Inspector.all_keys()
     stacktrace:
       :erlang.iolist_to_binary([[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[...] | <<...>>] | <<12::size(4)>>] | <<4::size(4)>>] | <<13::size(4)>>] | <<4::size(4)>>] | <<14::size(4)>>] | <<4::size(4)>>] | <<15::size(4)>>] | <<5::size(4)>>] | <<0::size(4)>>] | <<5::size(4)>>] | <<1::size(4)>>] | <<5::size(4)>>] | <<2::size(4)>>] | <<5::size(4)>>] | <<3::size(4)>>] | <<5::size(4)>>] | <<4::size(4)>>] | <<5::size(4)>>] | <<5::size(4)>>] | <<5::size(4)>>] | <<6::size(4)>>] | <<5::size(4)>>] | <<7::size(4)>>] | <<5::size(4)>>] | <<8::size(4)>>] | <<5::size(4)>>] | <<9::size(4)>>] | <<5::size(4)>>] | <<10::size(4)>>] | <<5::size(4)>>] | <<11::size(4)>>] | <<5::size(4)>>] | <<12::size(4)>>] | <<5::size(4)>>] | <<13::size(4)>>] | <<5::size(4)>>] | <<14::size(4)>>] | <<5::size(4)>>] | <<15::size(4)>>] | <<6::size(4)>>] | <<0::size(4)>>] | <<6::size(4)>>] | <<1::size(4)>>] | <<6::size(4)>>] | <<2::size(4)>>] | <<6::size(4)>>] | <<3::size(4)>>] | <<6::size(4)>>] | <<4::size(4)>>])
       (merkle_patricia_tree) lib/trie/helper.ex:41: MerklePatriciaTree.Trie.Helper.get_binary/1
       (merkle_patricia_tree) lib/trie/inspector.ex:63: MerklePatriciaTree.Trie.Inspector.merge_prefix/2
       (merkle_patricia_tree) lib/trie/inspector.ex:43: MerklePatriciaTree.Trie.Inspector.get_trie_value/2
       (merkle_patricia_tree) lib/trie/inspector.ex:57: anonymous fn/5 in MerklePatriciaTree.Trie.Inspector.get_trie_value/2
       (elixir) lib/enum.ex:2940: Enum.reduce_range_inc/4
       (merkle_patricia_tree) lib/trie/inspector.ex:93: MerklePatriciaTree.Trie.Inspector.all_keys/1
       (for doctest at) lib/trie/inspector.ex:82: (test)



  2) doctest MerklePatriciaTree.Trie.Inspector.all_values/1 (2) (MerklePatriciaTree.Trie.InspectorTest)
     test/trie/inspector_test.exs:3
     Doctest failed: got ArgumentError with message "argument error"
     code: MerklePatriciaTree.Trie.new(MerklePatriciaTree.Test.random_ets_db())
              |> MerklePatriciaTree.Trie.update("type", "fighter")
              |> MerklePatriciaTree.Trie.update("name", "bob")
              |> MerklePatriciaTree.Trie.update("nationality", "usa")
              |> MerklePatriciaTree.Trie.update("nato", "strong")
              |> MerklePatriciaTree.Trie.update((for x <- 1..100, into: <<>>, do: <<x::8>>), (for x <- 1..100, into: <<>>, do: <<x*2::8>>))
              |> MerklePatriciaTree.Trie.Inspector.all_values()
     stacktrace:
       :erlang.iolist_to_binary([[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[...] | <<...>>] | <<12::size(4)>>] | <<4::size(4)>>] | <<13::size(4)>>] | <<4::size(4)>>] | <<14::size(4)>>] | <<4::size(4)>>] | <<15::size(4)>>] | <<5::size(4)>>] | <<0::size(4)>>] | <<5::size(4)>>] | <<1::size(4)>>] | <<5::size(4)>>] | <<2::size(4)>>] | <<5::size(4)>>] | <<3::size(4)>>] | <<5::size(4)>>] | <<4::size(4)>>] | <<5::size(4)>>] | <<5::size(4)>>] | <<5::size(4)>>] | <<6::size(4)>>] | <<5::size(4)>>] | <<7::size(4)>>] | <<5::size(4)>>] | <<8::size(4)>>] | <<5::size(4)>>] | <<9::size(4)>>] | <<5::size(4)>>] | <<10::size(4)>>] | <<5::size(4)>>] | <<11::size(4)>>] | <<5::size(4)>>] | <<12::size(4)>>] | <<5::size(4)>>] | <<13::size(4)>>] | <<5::size(4)>>] | <<14::size(4)>>] | <<5::size(4)>>] | <<15::size(4)>>] | <<6::size(4)>>] | <<0::size(4)>>] | <<6::size(4)>>] | <<1::size(4)>>] | <<6::size(4)>>] | <<2::size(4)>>] | <<6::size(4)>>] | <<3::size(4)>>] | <<6::size(4)>>] | <<4::size(4)>>])
       (merkle_patricia_tree) lib/trie/helper.ex:41: MerklePatriciaTree.Trie.Helper.get_binary/1
       (merkle_patricia_tree) lib/trie/inspector.ex:63: MerklePatriciaTree.Trie.Inspector.merge_prefix/2
       (merkle_patricia_tree) lib/trie/inspector.ex:43: MerklePatriciaTree.Trie.Inspector.get_trie_value/2
       (merkle_patricia_tree) lib/trie/inspector.ex:57: anonymous fn/5 in MerklePatriciaTree.Trie.Inspector.get_trie_value/2
       (elixir) lib/enum.ex:2940: Enum.reduce_range_inc/4
       (for doctest at) lib/trie/inspector.ex:22: (test)

.

  3) doctest MerklePatriciaTree.Trie.Helper.get_binary/1 (3) (MerklePatriciaTree.Trie.HelperTest)
     test/trie/helper_test.exs:3
     Doctest failed: got ArgumentError with message "argument error"
     code: MerklePatriciaTree.Trie.Helper.get_binary([0, 1, 0, 2, 0, 3])
     stacktrace:
       :erlang.iolist_to_binary([[[[[["" | <<0::size(4)>>] | <<1::size(4)>>] | <<0::size(4)>>] | <<2::size(4)>>] | <<0::size(4)>>] | <<3::size(4)>>])
       (merkle_patricia_tree) lib/trie/helper.ex:41: MerklePatriciaTree.Trie.Helper.get_binary/1
       (for doctest at) lib/trie/helper.ex:36: (test)



  4) doctest MerklePatriciaTree.Trie.Helper.get_binary/1 (2) (MerklePatriciaTree.Trie.HelperTest)
     test/trie/helper_test.exs:3
     Doctest failed: got ArgumentError with message "argument error"
     code: MerklePatriciaTree.Trie.Helper.get_binary([1, 2, 3])
     stacktrace:
       :erlang.iolist_to_binary([[["" | <<1::size(4)>>] | <<2::size(4)>>] | <<3::size(4)>>])
       (merkle_patricia_tree) lib/trie/helper.ex:41: MerklePatriciaTree.Trie.Helper.get_binary/1
       (for doctest at) lib/trie/helper.ex:33: (test)

..

  5) doctest MerklePatriciaTree.Trie.Helper.get_binary/1 (1) (MerklePatriciaTree.Trie.HelperTest)
     test/trie/helper_test.exs:3
     Doctest failed: got ArgumentError with message "argument error"
     code: MerklePatriciaTree.Trie.Helper.get_binary([0x01, 0x0e, 0x02, 0x0f])
     stacktrace:
       :erlang.iolist_to_binary([[[["" | <<1::size(4)>>] | <<14::size(4)>>] | <<2::size(4)>>] | <<15::size(4)>>])
       (merkle_patricia_tree) lib/trie/helper.ex:41: MerklePatriciaTree.Trie.Helper.get_binary/1
       (for doctest at) lib/trie/helper.ex:30: (test)

Elixir 1.6.3

 1) doctest MerklePatriciaTree.Trie.Inspector.all_values/1 (2) (MerklePatriciaTree.Trie.InspectorTest)
     test/trie/inspector_test.exs:3
     Doctest failed: got ArgumentError with message "argument error"
     code: MerklePatriciaTree.Trie.new(MerklePatriciaTree.Test.random_ets_db())
              |> MerklePatriciaTree.Trie.update("type", "fighter")
              |> MerklePatriciaTree.Trie.update("name", "bob")
              |> MerklePatriciaTree.Trie.update("nationality", "usa")
              |> MerklePatriciaTree.Trie.update("nato", "strong")
              |> MerklePatriciaTree.Trie.update((for x <- 1..100, into: <<>>, do: <<x::8>>), (for x <- 1..100, into: <<>>, do: <<x*2::8>>))
              |> MerklePatriciaTree.Trie.Inspector.all_values()
     stacktrace:
       :erlang.iolist_to_binary(<<16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 241, 1, 17, 33, 49, 65, 81, 97, 113, 129, 145, 161, 177, 193, 209, 225, 242, 2, 18, 34, 50, 66, 82, 98, 114, 130, 146, 162, 178, 194, 210, 226, 243, 3, 19, 35, ...>>)
       (merkle_patricia_tree) lib/trie/helper.ex:41: MerklePatriciaTree.Trie.Helper.get_binary/1
       (merkle_patricia_tree) lib/trie/inspector.ex:63: MerklePatriciaTree.Trie.Inspector.merge_prefix/2
       (merkle_patricia_tree) lib/trie/inspector.ex:43: MerklePatriciaTree.Trie.Inspector.get_trie_value/2
       (merkle_patricia_tree) lib/trie/inspector.ex:57: anonymous fn/5 in MerklePatriciaTree.Trie.Inspector.get_trie_value/2
       (elixir) lib/enum.ex:2941: Enum.reduce_range_inc/4
       (for doctest at) lib/trie/inspector.ex:22: (test)



  2) doctest MerklePatriciaTree.Trie.Helper.get_binary/1 (2) (MerklePatriciaTree.Trie.HelperTest)
     test/trie/helper_test.exs:3
     Doctest failed: got ArgumentError with message "argument error"
     code: MerklePatriciaTree.Trie.Helper.get_binary([1, 2, 3])
     stacktrace:
       :erlang.iolist_to_binary(<<18, 3::size(4)>>)
       (merkle_patricia_tree) lib/trie/helper.ex:41: MerklePatriciaTree.Trie.Helper.get_binary/1
       (for doctest at) lib/trie/helper.ex:33: (test)



  3) doctest MerklePatriciaTree.Trie.Inspector.all_keys/1 (1) (MerklePatriciaTree.Trie.InspectorTest)
     test/trie/inspector_test.exs:3
     Doctest failed: got ArgumentError with message "argument error"
     code: MerklePatriciaTree.Trie.new(MerklePatriciaTree.Test.random_ets_db())
              |> MerklePatriciaTree.Trie.update("type", "fighter")
              |> MerklePatriciaTree.Trie.update("name", "bob")
              |> MerklePatriciaTree.Trie.update("nationality", "usa")
              |> MerklePatriciaTree.Trie.update("nato", "strong")
              |> MerklePatriciaTree.Trie.update((for x <- 1..100, into: <<>>, do: <<x::8>>), (for x <- 1..100, into: <<>>, do: <<x*2::8>>))
              |> MerklePatriciaTree.Trie.Inspector.all_keys()
     stacktrace:
       :erlang.iolist_to_binary(<<16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 241, 1, 17, 33, 49, 65, 81, 97, 113, 129, 145, 161, 177, 193, 209, 225, 242, 2, 18, 34, 50, 66, 82, 98, 114, 130, 146, 162, 178, 194, 210, 226, 243, 3, 19, 35, ...>>)
       (merkle_patricia_tree) lib/trie/helper.ex:41: MerklePatriciaTree.Trie.Helper.get_binary/1
       (merkle_patricia_tree) lib/trie/inspector.ex:63: MerklePatriciaTree.Trie.Inspector.merge_prefix/2
       (merkle_patricia_tree) lib/trie/inspector.ex:43: MerklePatriciaTree.Trie.Inspector.get_trie_value/2
       (merkle_patricia_tree) lib/trie/inspector.ex:57: anonymous fn/5 in MerklePatriciaTree.Trie.Inspector.get_trie_value/2
       (elixir) lib/enum.ex:2941: Enum.reduce_range_inc/4
       (merkle_patricia_tree) lib/trie/inspector.ex:93: MerklePatriciaTree.Trie.Inspector.all_keys/1
       (for doctest at) lib/trie/inspector.ex:82: (test)

Dockerfile

FROM elixir:1.6.3

RUN mix local.hex --force
RUN mix local.rebar --force
COPY . /app

WORKDIR /app

RUN mix deps.get && \
    mix test

Tests pass fine on 1.6.1, 1.6.2, 1.6.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant