Errors in test with OTP26.1.2/Elixir 1.15.7
kianmeng opened this issue · comments
Kian-Meng Ang commented
Describe the bug
Errors in test with OTP26.1.2/Elixir 1.15.7
To Reproduce
Steps to reproduce the behavior:
- git clone https://github.com/otobus/event_bus
- cd event_bus
- mix deps.get
- mix test
Expected behavior
Pass all test.
Logs
.......
13:03:30.443 [warning] Topic(:user_created) doesn't have subscribers
......................
13:03:36.207 [info] [EVENTBUS][STORE] metrics_received_5.E1.ets_fetch_error
.............
1) test notify (EventBus.Service.NotificationTest)
test/event_bus/services/notification_test.exs:41
Expected truthy, got false
code: assert String.contains?(
logs,
"Event log for %EventBus.Model.Event{data: [1, 2], id: \"E1\", initialized_at: nil, occurred_at: nil, source: \"NotificationTest\", topic: :metrics_received, transaction_id: \"T1\", ttl: nil}"
)
arguments:
# 1
"\n13:03:36.534 [info] Elixir.EventBus.Support.Helper.AnotherBadOne.process/1 raised an error!\n%RuntimeError{message: \"I don't want to handle your event\"}\n\n13:03:36.534 [info] Elixir.EventBus.Support.Helper.AnotherBadOne.process/1 raised an error!\n%RuntimeError{message: \"I don't want to handle your event\"}\n\n13:03:36.539 [info] Elixir.EventBus.Support.Helper.BadOne.process/1 raised an error!\n%UndefinedFunctionError{module: EventBus.Support.Helper.BadOne, function: :process, arity: 1, reason: nil, message: nil}\n\n13:03:36.539 [info] Elixir.EventBus.Support.Helper.BadOne.process/1 raised an error!\n%UndefinedFunctionError{module: EventBus.Support.Helper.BadOne, function: :process, arity: 1, reason: nil, message: nil}\n\n13:03:36.540 [info] Event log for %EventBus.Model.Event{id: \"E1\", transaction_id: \"T1\", topic: :metrics_received, data: [1, 2], initialized_at: nil, occurred_at: nil, source: \"NotificationTest\", ttl: nil}\n\n13:03:36.541 [info] Event log for %EventBus.Model.Event{id: \"E123\", transaction_id: \"T1\", topic: :metrics_summed, data: {3, [1, 2]}, initialized_at: nil, occurred_at: nil, source: \"AnotherCalculator\", ttl: nil}\n\n13:03:36.541 [info] Elixir.EventBus.Support.Helper.AnotherBadOne.process/1 raised an error!\n%RuntimeError{message: \"I don't want to handle your event\"}\n\n13:03:36.541 [info] Elixir.EventBus.Support.Helper.BadOne.process/1 raised an error!\n%UndefinedFunctionError{module: EventBus.Support.Helper.BadOne, function: :process, arity: 1, reason: nil, message: nil}\n\n13:03:36.541 [info] Event log for %EventBus.Model.Event{id: \"E123\", transaction_id: \"T1\", topic: :metrics_summed, data: {3, [1, 2]}, initialized_at: nil, occurred_at: nil, source: \"Logger\", ttl: nil}\n"
# 2
"Event log for %EventBus.Model.Event{data: [1, 2], id: \"E1\", initialized_at: nil, occurred_at: nil, source: \"NotificationTest\", topic: :metrics_received, transaction_id: \"T1\", ttl: nil}"
stacktrace:
test/event_bus/services/notification_test.exs:72: (test)
..........
13:03:37.755 [info] [EVENTBUS][OBSERVATION] some_event_occurred1.NA.ets_fetch_error
.
13:03:37.757 [info] Elixir.EventBus.Support.Helper.AnotherBadOne.process/1 raised an error!
%RuntimeError{message: "I don't want to handle your event"}
.
13:03:37.757 [info] Elixir.EventBus.Support.Helper.BadOne.process/1 raised an error!
%UndefinedFunctionError{module: EventBus.Support.Helper.BadOne, function: :process, arity: 1, reason: nil, message: nil}
.
13:03:37.757 [info] Event log for %EventBus.Model.Event{id: "E1", transaction_id: "T1", topic: :metrics_received, data: [1, 2], initialized_at: nil, occurred_at: nil, source: "NotifierTest", ttl: nil}
.
13:03:37.757 [info] Elixir.EventBus.Support.Helper.AnotherBadOne.process/1 raised an error!
%RuntimeError{message: "I don't want to handle your event"}
.
13:03:37.757 [info] Elixir.EventBus.Support.Helper.BadOne.process/1 raised an error!
%UndefinedFunctionError{module: EventBus.Support.Helper.BadOne, function: :process, arity: 1, reason: nil, message: nil}
13:03:37.757 [info] Event log for %EventBus.Model.Event{id: "E123", transaction_id: "T1", topic: :metrics_summed, data: {3, [1, 2]}, initialized_at: nil, occurred_at: nil, source: "AnotherCalculator", ttl: nil}
13:03:37.757 [info] Elixir.EventBus.Support.Helper.BadOne.process/1 raised an error!
%UndefinedFunctionError{module: EventBus.Support.Helper.BadOne, function: :process, arity: 1, reason: nil, message: nil}
13:03:37.757 [info] Event log for %EventBus.Model.Event{id: "E123", transaction_id: "T1", topic: :metrics_summed, data: {3, [1, 2]}, initialized_at: nil, occurred_at: nil, source: "Logger", ttl: nil}
13:03:37.758 [info] Elixir.EventBus.Support.Helper.AnotherBadOne.process/1 raised an error!
%RuntimeError{message: "I don't want to handle your event"}
2) test notify (EventBusTest)
test/event_bus_test.exs:31
Expected truthy, got false
code: assert String.contains?(
logs,
"Event log for %EventBus.Model.Event{data:" <>
" [1, 7], id: \"M1\", initialized_at: nil, occurred_at: nil," <>
" source: \"EventBusTest\", topic: :metrics_received," <> " transaction_id: \"T1\", ttl: nil}"
)
arguments:
# 1
"\n13:03:37.858 [info] Elixir.EventBus.Support.Helper.BadOne.process/1 raised an error!\n%UndefinedFunctionError{module: EventBus.Support.Helper.BadOne, function: :process, arity: 1, reason: nil, message: nil}\n\n13:03:37.858 [info] Event log for %EventBus.Model.Event{id: \"M1\", transaction_id: \"T1\", topic: :metrics_received, data: [1, 7], initialized_at: nil, occurred_at: nil, source: \"EventBusTest\", ttl: nil}\n\n13:03:37.858 [info] Elixir.EventBus.Support.Helper.AnotherBadOne.process/1 raised an error!\n%RuntimeError{message: \"I don't want to handle your event\"}\n\n13:03:37.858 [info] Elixir.EventBus.Support.Helper.BadOne.process/1 raised an error!\n%UndefinedFunctionError{module: EventBus.Support.Helper.BadOne, function: :process, arity: 1, reason: nil, message: nil}\n\n13:03:37.859 [info] Event log for %EventBus.Model.Event{id: \"E123\", transaction_id: \"T1\", topic: :metrics_summed, data: {8, [1, 7]}, initialized_at: nil, occurred_at: nil, source: \"Logger\", ttl: nil}\n\n13:03:37.859 [info] Elixir.EventBus.Support.Helper.AnotherBadOne.process/1 raised an error!\n%RuntimeError{message: \"I don't want to handle your event\"}\n\n13:03:37.859 [info] Elixir.EventBus.Support.Helper.BadOne.process/1 raised an error!\n%UndefinedFunctionError{module: EventBus.Support.Helper.BadOne, function: :process, arity: 1, reason: nil, message: nil}\n\n13:03:37.859 [info] Event log for %EventBus.Model.Event{id: \"E123\", transaction_id: \"T1\", topic: :metrics_summed, data: {8, [1, 7]}, initialized_at: nil, occurred_at: nil, source: \"AnotherCalculator\", ttl: nil}\n\n13:03:37.859 [info] Elixir.EventBus.Support.Helper.AnotherBadOne.process/1 raised an error!\n%RuntimeError{message: \"I don't want to handle your event\"}\n"
# 2
"Event log for %EventBus.Model.Event{data: [1, 7], id: \"M1\", initialized_at: nil, occurred_at: nil, source: \"EventBusTest\", topic: :metrics_received, transaction_id: \"T1\", ttl: nil}"
stacktrace:
test/event_bus_test.exs:48: (test)
............
Finished in 8.8 seconds (0.00s async, 8.8s sync)
71 tests, 2 failures
Randomized with seed 292741
please complete the following information:
- OS: Alpine 3.8, Ubuntu x.x, Centos x.x, Mac OS 10.13.2
- Elixir version: 1.15.7
- OTP version: 26.1.2
Additional context
Add any other context about the problem here.