Skip to content

Commit

Permalink
CQ: Change the scan test to pad with zeroes instead of random bytes
Browse files Browse the repository at this point in the history
We don't expect random bytes to be there in the current
version of the message store as we overwrite empty spaces
with zeroes when moving messages around.
  • Loading branch information
lhoguin committed Nov 14, 2024
1 parent 2795293 commit c570235
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deps/rabbit/test/backing_queue_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -668,8 +668,8 @@ gen_msg_file(Config, Blocks) ->
{bin, Bin} ->
Bin;
{pad, Size} ->
%% This might generate false positives although very unlikely.
rand:bytes(Size);
%% Empty space between messages is expected to be zeroes.
<<0:Size/unit:8>>;
{msg, MsgId, Msg} ->
Size = 16 + byte_size(Msg),
[<<Size:64>>, MsgId, Msg, <<255>>]
Expand Down

0 comments on commit c570235

Please sign in to comment.