mirror of
https://github.com/valitydev/riak_test.git
synced 2024-11-06 16:45:29 +00:00
11cd845c6c
Verify that if the leader election occurs before the ring has converged, that we still connect to remote sinks. This test uses an intercept to ensure we can delay the ring events to occur until after the election.
13 lines
401 B
Erlang
13 lines
401 B
Erlang
-module(riak_repl_ring_handler_intercepts).
|
|
-compile(export_all).
|
|
-include("intercept.hrl").
|
|
|
|
-define(M, riak_repl_ring_handler_orig).
|
|
|
|
%% @doc Make all commands take abnormally long.
|
|
slow_handle_event(Event, State) ->
|
|
io:format("slow handle event triggered by intercept", []),
|
|
?I_INFO("slow handle event triggered by intercept"),
|
|
timer:sleep(500),
|
|
?M:handle_event_orig(Event, State).
|