Skip to content

Commit 1c727a4

Browse files
committed
test fix
1 parent 21b9eb5 commit 1c727a4

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

deps/rabbit/test/rabbit_fifo_SUITE.erl

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -655,11 +655,10 @@ state_enter_file_handle_leader_reservation_test(_) ->
655655

656656
Resource = {resource, <<"/">>, queue, <<"test">>},
657657
Effects = rabbit_fifo:state_enter(leader, S0),
658-
?assertMatch([
659-
{mod_call, m, f, [a, the_name]},
660-
_Timer,
661-
{mod_call, rabbit_quorum_queue, file_handle_leader_reservation, [Resource]}
662-
], Effects),
658+
?assertMatch([{mod_call, m, f, [a, the_name]},
659+
_Timer,
660+
{mod_call, rabbit_quorum_queue, file_handle_leader_reservation, [Resource]}
661+
| _], Effects),
663662
ok.
664663

665664
state_enter_file_handle_other_reservation_test(_) ->
@@ -1161,20 +1160,22 @@ single_active_consumer_state_enter_leader_include_waiting_consumers_test(C) ->
11611160
Meta = meta(C, 1),
11621161
% adding some consumers
11631162
AddConsumer = fun({CTag, ChannelId}, State) ->
1164-
{NewState, _, _} = apply(
1165-
Meta,
1166-
make_checkout({CTag, ChannelId},
1167-
{once, 1, simple_prefetch}, #{}),
1168-
State),
1169-
NewState
1163+
{NewState, _, _} = apply(
1164+
Meta,
1165+
make_checkout({CTag, ChannelId},
1166+
{once, 1, simple_prefetch}, #{}),
1167+
State),
1168+
NewState
11701169
end,
1171-
State1 = lists:foldl(AddConsumer, State0,
1172-
[{<<"ctag1">>, Pid1}, {<<"ctag2">>, Pid2}, {<<"ctag3">>, Pid2}, {<<"ctag4">>, Pid3}]),
1170+
State1 = lists:foldl(AddConsumer, State0, [{<<"ctag1">>, Pid1},
1171+
{<<"ctag2">>, Pid2},
1172+
{<<"ctag3">>, Pid2},
1173+
{<<"ctag4">>, Pid3}]),
11731174

11741175
Effects = rabbit_fifo:state_enter(leader, State1),
11751176
%% 2 effects for each consumer process (channel process), 1 effect for the node,
11761177
%% 1 effect for file handle reservation
1177-
?assertEqual(2 * 3 + 1 + 1 + 1, length(Effects)).
1178+
?assertEqual(2 * 3 + 1 + 1 + 1 + 1, length(Effects)).
11781179

11791180
single_active_consumer_state_enter_eol_include_waiting_consumers_test(C) ->
11801181
Resource = rabbit_misc:r("/", queue, atom_to_binary(?FUNCTION_NAME, utf8)),

0 commit comments

Comments
 (0)