diff options
| author | kjnilsson <knilsson@pivotal.io> | 2020-03-17 13:52:53 +0000 |
|---|---|---|
| committer | kjnilsson <knilsson@pivotal.io> | 2020-03-17 13:52:53 +0000 |
| commit | abc0b522de83e36650e873d2065646dc1f4ae1d4 (patch) | |
| tree | bd385ecf0fc53642f96d5150f153af75282792fa /test | |
| parent | 5239852216100dad2658458575948758e35b3fa4 (diff) | |
| download | rabbitmq-server-git-abc0b522de83e36650e873d2065646dc1f4ae1d4.tar.gz | |
rabbit_fifo_SUITE mock log better
Diffstat (limited to 'test')
| -rw-r--r-- | test/rabbit_fifo_SUITE.erl | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/test/rabbit_fifo_SUITE.erl b/test/rabbit_fifo_SUITE.erl index 8e513e5555..e5ca7c15cb 100644 --- a/test/rabbit_fifo_SUITE.erl +++ b/test/rabbit_fifo_SUITE.erl @@ -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. |
