Commit Graph

11 Commits

Author SHA1 Message Date
Michal Kuratczyk cfa3de4b2b
Remove unused imports (thanks elp!) 2024-05-23 16:36:08 +02:00
Rin Kuryloski 01ff713830 Update PLT_APPS for rabbitmq_prelaunch 2024-04-29 15:01:35 +02:00
Rin Kuryloski 6d845c570c Add dep_gen_batch_server to rabbitmq-components.mk
Follow up to #11016
2024-04-16 17:39:21 +02:00
Michael Klishin f414c2d512
More missed license header updates #9969 2024-02-05 11:53:50 -05:00
Michael Klishin 7b151a7651 More missed (c) header updates 2024-01-22 23:44:47 -05:00
Jean-Sébastien Pédron 9a02e3e6ef
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.
2024-01-18 13:58:40 +01:00
Jean-Sébastien Pédron 89c6c590bd
rabbit_logger_std_h: Sync with Erlang/OTP 26.1.2
[Why]
`rabbit_logger_std_h` is a fork of Erlang/OTP's `logger_std_h` to:
* allow to mock the call to io:put_chars/2
* support date-based rotation

[How]
The initial fork was from Erlang/OTP 23.0. Here, we update it to
Erlang/OTP 26.1.2.
2024-01-18 13:58:40 +01:00
Jean-Sébastien Pédron 67fccf0ccc
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.
2024-01-18 13:58:40 +01:00
Luke Bakken d5aaaa95ea
Ensure `peer:start/1` takes long names into account
Discovered while testing
https://github.com/rabbitmq/rabbitmq-server/pull/10108 by using the
lukebakken/docker-rabbitmq-cluster project.

That project, by default, uses longnames for node names. When testing
classic peer discovery, starting a peer node would time out every time.

Ensure `host` is set
2023-12-14 06:12:52 -08:00
Jean-Sébastien Pédron cc18c8b141
rabbitmq_prelaunch: Adapt Makefiles and Bazel files after the move 2023-12-08 14:42:53 +01:00
Jean-Sébastien Pédron 26ebcda301
Move rabbitmq_prelaunch from `deps/rabbit/apps` to `deps`
[Why]
Building an Erlang release with this application under `apps` happened
to be problematic with Erlang.mk. Our use of deps and apps is not
exactly standard here anyway.

We also get issues with various make targets where `rabbitmq_prelaunch`
is being cleaned and not re-compiled, leading to "application not found"
errors.

[How]
So instead of fighting, move `rabbitmq_prelaunch` to the deps directory,
like all other applications.

This commit is not enough and will be followed with changes to Makefiles
and Bazel files. This is not done in this commit so the changes are
visible. Otherwise, they would be burried in the move.
2023-12-08 12:52:56 +01:00