You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rabbit_logger_std_h: Mock calls to io:put_chars/2 during testing
[Why]
Before `rabbitmq_prelaunch` was moved from `deps/rabbit/apps` to `deps`,
it would inherit compile flags from `deps/rabbit`. Therefore, when
`rabbit` was tested, `rabbit_logger_std_h` simply replaced the calls to
`io:put_chars/2` with an internal macro to also call `ct:log/2`.
This is not possible anymore after the move and the move broke the
console-based testcases.
[How]
`rabbit_logger_std_h` now uses an indirect internal call to a wrapper of
`io:put_chars/2`. This allows the `logging_SUITE` to mock that call and
add the addition call to `ct:log/2`.
We need to do an explicit `?MODULE:io_put_chars/2` even though a local
call would work, otherwise meck can't intercept the calls.
0 commit comments