diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/rabbit_fifo_prop_SUITE.erl | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/test/rabbit_fifo_prop_SUITE.erl b/test/rabbit_fifo_prop_SUITE.erl index 5643da1991..c9a9183b5f 100644 --- a/test/rabbit_fifo_prop_SUITE.erl +++ b/test/rabbit_fifo_prop_SUITE.erl @@ -310,7 +310,7 @@ checkout_gen(Pid) -> -record(t, {state = rabbit_fifo:init(#{name => proper, queue_resource => blah, - shadow_copy_interval => 1}) + release_cursor_interval => 1}) :: rabbit_fifo:state(), index = 1 :: non_neg_integer(), %% raft index enqueuers = #{} :: #{pid() => term()}, @@ -473,7 +473,8 @@ run_snapshot_test(Conf, Commands) -> run_snapshot_test0(Conf, Commands) -> Indexes = lists:seq(1, length(Commands)), Entries = lists:zip(Indexes, Commands), - {State, Effects} = run_log(test_init(Conf), Entries), + {State0, Effects} = run_log(test_init(Conf), Entries), + State = rabbit_fifo:normalize(State0), % ct:pal("beginning snapshot test run for ~w numn commands ~b", % [maps:get(name, Conf), length(Commands)]), @@ -482,7 +483,12 @@ run_snapshot_test0(Conf, Commands) -> Filtered = lists:dropwhile(fun({X, _}) when X =< SnapIdx -> true; (_) -> false end, Entries), - {S, _} = run_log(SnapState, Filtered), + % ct:pal("running from snapshot at ~w ~p", [SnapIdx, SnapState]), + % ct:pal("Snapshot tests run log:~n" + % "~p~n from ~n~p~n Entries~n~p~n", + % [Filtered, SnapState, Entries]), + {S0, _} = run_log(SnapState, Filtered), + S = rabbit_fifo:normalize(S0), % assert log can be restored from any release cursor index case S of State -> ok; @@ -516,7 +522,7 @@ run_log(InitState, Entries) -> test_init(Conf) -> Default = #{queue_resource => blah, - shadow_copy_interval => 0, + release_cursor_interval => 0, metrics_handler => {?MODULE, metrics_handler, []}}, rabbit_fifo:init(maps:merge(Default, Conf)). |
