Skip to content

Commit 67fccf0

Browse files
committed
rabbit_prelaunch_early_logging: Always export APIs needed in tests
[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, `rabbitmq_prelaunch` would be compiled with `-DTEST`. After the move, this is not the case anymore. Thus, the `logging_SUITE` testsuite can't call those internal functions anymore. [How] Now, the needed functions are always exported. We simply comment that they are for internal testing purpose and should not be called in production code.
1 parent c1b845f commit 67fccf0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

deps/rabbitmq_prelaunch/src/rabbit_prelaunch_early_logging.erl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,9 @@
2525
-export([filter_log_event/2]).
2626
-export([filter_discarded_message/2]).
2727

28-
-ifdef(TEST).
28+
%% For internal testing purpose only.
2929
-export([levels/0,
3030
determine_prefix/1]).
31-
-endif.
3231

3332
-define(CONFIGURED_KEY, {?MODULE, configured}).
3433

0 commit comments

Comments
 (0)