Skip to content

Commit a183da8

Browse files
committed
Add test function to generate a stream log
1 parent 6a754dc commit a183da8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

deps/rabbitmq_stream/test/rabbit_stream_SUITE.erl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
-include_lib("eunit/include/eunit.hrl").
2121
-include_lib("rabbit_common/include/rabbit.hrl").
22+
-include_lib("amqp10_common/include/amqp10_framing.hrl").
2223
-include_lib("rabbitmq_ct_helpers/include/rabbit_assert.hrl").
2324
-include_lib("rabbitmq_stream_common/include/rabbit_stream.hrl").
2425

@@ -1773,3 +1774,9 @@ request(CorrId, Cmd) ->
17731774

17741775
rand_bin() ->
17751776
base64:encode(rand:bytes(20)).
1777+
1778+
generate_log(MsgSize, MsgsPerChunk, NumMessages, Directory) ->
1779+
Body = binary:copy(<<"a">>, MsgSize),
1780+
Data = #'v1_0.data'{content = Body},
1781+
Bin = amqp10_framing:encode_bin(Data),
1782+
osiris_log:generate_log(Bin, MsgsPerChunk, NumMessages, Directory).

0 commit comments

Comments
 (0)