riak_test/intercepts/riak_repl_ring_handler_intercepts.erl
Christopher Meiklejohn 11cd845c6c Add sink verification test.
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.
2013-12-07 15:25:40 -05:00

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).