mirror of
https://github.com/valitydev/riak_test.git
synced 2024-11-06 08:35:22 +00:00
a5746cb416
Adding onto the existing test to prove that a reconnection to the same endpoint can occur after the cancelled connection has been removed.
16 lines
505 B
Erlang
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).
|