riak_test/intercepts/riak_core_connection_intercepts.erl
bsparrow435 a5746cb416 Adding re-connection test
Adding onto the existing test to prove that a reconnection to the same
endpoint can occur after the cancelled connection has been removed.
2014-06-04 21:46:57 -04:00

16 lines
505 B
Erlang

-module(riak_core_connection_intercepts).
-compile(export_all).
-include("intercept.hrl").
-define(M, riak_core_connection_orig).
%% @doc Return econnrefused for all connection attempts
return_econnrefused(Addr,_ClientSpec) ->
?I_INFO("Returning econnrefused for all connections to: ~p",[Addr]),
{error, econnrefused}.
%% @doc Pass through for sync_connect function
sync_connect(Addr, ClientSpec) ->
?I_INFO("Intercept is allowing connections"),
?M:sync_connect_orig(Addr, ClientSpec).