diff options
author | Anders Svensson <[email protected]> | 2011-12-02 19:16:49 +0100 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2011-12-06 18:58:14 +0100 |
commit | 3fff6006bd00cc41ed6c93a029f38b2edb630b7d (patch) | |
tree | 7c3131722b6250689aafc985bb6972ffb5bb4a22 /lib/diameter/test | |
parent | b98219cb6131b8ac8a9cbed5e67e7d8d23dadd24 (diff) | |
download | otp-3fff6006bd00cc41ed6c93a029f38b2edb630b7d.tar.gz otp-3fff6006bd00cc41ed6c93a029f38b2edb630b7d.tar.bz2 otp-3fff6006bd00cc41ed6c93a029f38b2edb630b7d.zip |
Use diameter_callback in failover suite
Diffstat (limited to 'lib/diameter/test')
-rw-r--r-- | lib/diameter/test/diameter_failover_SUITE.erl | 33 |
1 files changed, 7 insertions, 26 deletions
diff --git a/lib/diameter/test/diameter_failover_SUITE.erl b/lib/diameter/test/diameter_failover_SUITE.erl index aef2447587..429b6328e6 100644 --- a/lib/diameter/test/diameter_failover_SUITE.erl +++ b/lib/diameter/test/diameter_failover_SUITE.erl @@ -48,13 +48,9 @@ stop/1]). %% diameter callbacks --export([peer_up/3, - peer_down/3, - pick_peer/4, +-export([pick_peer/4, prepare_request/3, - prepare_retransmit/3, handle_answer/4, - handle_error/4, handle_request/3]). -include("diameter.hrl"). @@ -90,7 +86,12 @@ {'Acct-Application-Id', [Dict:id()]}, {application, [{alias, ?APP_ALIAS}, {dictionary, Dict}, - {module, ?MODULE}, + {module, #diameter_callback + {peer_up = false, + peer_down = false, + handle_error = false, + prepare_retransmit = false, + default = ?MODULE}}, {answer_errors, callback}]}]). -define(SUCCESS, 2001). @@ -180,16 +181,6 @@ set([H|T], Vs) -> %% =========================================================================== %% diameter callbacks -%% peer_up/3 - -peer_up(_SvcName, _Peer, State) -> - State. - -%% peer_down/3 - -peer_down(_SvcName, _Peer, State) -> - State. - %% pick_peer/4 %% Choose a server other than SERVER3 or SERVER5 if possible. @@ -218,22 +209,12 @@ prepare(#diameter_packet{msg = Req}, Caps) -> {'Origin-Host', OH}, {'Origin-Realm', OR}]). -%% prepare_retransmit/3 - -prepare_retransmit(Pkt, ?CLIENT, _Peer) -> - {send, Pkt}. - %% handle_answer/4 handle_answer(Pkt, _Req, ?CLIENT, _Peer) -> #diameter_packet{msg = Rec, errors = []} = Pkt, Rec. -%% handle_error/4 - -handle_error(Reason, _Req, ?CLIENT, _Peer) -> - {error, Reason}. - %% handle_request/3 %% Only SERVER3 actually answers. |