junit-formatter icon indicating copy to clipboard operation
junit-formatter copied to clipboard

JUnitFormatter.generate_test_body/1 is passing nil to :erlang.bit_size

Open KronicDeth opened this issue 8 years ago • 5 comments

10:14:56.155 [error] GenEvent handler JUnitFormatter installed in #PID<0.701.0> terminating
** (ArgumentError) argument error
    :erlang.bit_size(nil)
    lib/formatter.ex:183: JUnitFormatter.generate_test_body/1
    lib/formatter.ex:165: JUnitFormatter.generate_testcases/1
    lib/formatter.ex:145: anonymous fn/2 in JUnitFormatter.generate_testsuite_xml/1
    (elixir) lib/enum.ex:1473: Enum."-reduce/3-lists^foldl/2-0-"/3
    lib/formatter.ex:144: JUnitFormatter.generate_testsuite_xml/1
    (elixir) lib/enum.ex:1088: Enum."-map/2-lists^map/1-0-"/2
    (elixir) lib/enum.ex:1088: Enum."-map/2-lists^map/1-0-"/2
    lib/formatter.ex:64: JUnitFormatter.handle_event/2
    (stdlib) gen_event.erl:538: :gen_event.server_update/4
    (stdlib) gen_event.erl:520: :gen_event.server_notify/4
    (stdlib) gen_event.erl:261: :gen_event.handle_msg/5
    (stdlib) proc_lib.erl:240: :proc_lib.init_p_do_apply/3

KronicDeth avatar Apr 06 '16 15:04 KronicDeth

Sorry for the delay. I was a bit off this week.

Can you give me some more info on the issue? All tests pass so I can't reproduce your error.

I tested with an empty test module (with only use ExUnit.Case) to see if that would generate it but it generates properly. So, if you can show me some way to reproduce it I can see about a fix.

victorolinasc avatar Apr 11 '16 01:04 victorolinasc

Unfortunately this is triggering in a closed source project. I might be able to submit a use case once we open source some of the libraries. Feel free to close this and I'll comment once I have a use case.

KronicDeth avatar Apr 14 '16 02:04 KronicDeth

I'll leave this one open. If people pass through the same thing they can collaborate here.

Do you think it might have anything to do with #8 ?

cs-victor-nascimento avatar Apr 14 '16 14:04 cs-victor-nascimento

Unclear if it is related to #8. IIRC it happened most often when there were enough crashes to bring down parts of the app's supervision trees as I remember seeing SASL logs too appearing.

KronicDeth avatar Apr 14 '16 22:04 KronicDeth

Hey @KronicDeth! I've released version 1.1.0 which covers umbrella apps. Maybe this issue was related to that. I was just curious if you are still having these issues.

cs-victor-nascimento avatar Jun 02 '16 21:06 cs-victor-nascimento