Skip to content

Commit

Permalink
rabbit_fifo_SUITE mock log better
Browse files Browse the repository at this point in the history
  • Loading branch information
kjnilsson committed Mar 17, 2020
1 parent 5239852 commit abc0b52
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/rabbit_fifo_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1353,12 +1353,15 @@ aux_test(_) ->
MacState = init(#{name => aux_test,
queue_resource =>
rabbit_misc:r(<<"/">>, queue, <<"test">>)}),
Log = undefined,
{no_reply, Aux, undefined} = handle_aux(leader, cast, active, Aux0,
ok = meck:new(ra_log, []),
Log = mock_log,
meck:expect(ra_log, last_index_term, fun (_) -> {0, 0} end),
{no_reply, Aux, mock_log} = handle_aux(leader, cast, active, Aux0,
Log, MacState),
{no_reply, _Aux, undefined} = handle_aux(leader, cast, tick, Aux,
{no_reply, _Aux, mock_log} = handle_aux(leader, cast, tick, Aux,
Log, MacState),
[X] = ets:lookup(rabbit_fifo_usage, aux_test),
meck:unload(),
?assert(X > 0.0),
ok.

Expand Down

0 comments on commit abc0b52

Please sign in to comment.