aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/test/diameter_failover_SUITE.erl
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2012-12-07 17:28:49 +0100
committerAnders Svensson <[email protected]>2012-12-10 12:42:48 +0100
commitec3672616b5e7b480858e38306653ba9493e4fb9 (patch)
tree834e367766f4c0d529851a1514a3cd2958e45d7e /lib/diameter/test/diameter_failover_SUITE.erl
parentaf3b1ce866a16c38d1b3f1452d75bcacc6635e9b (diff)
downloadotp-ec3672616b5e7b480858e38306653ba9493e4fb9.tar.gz
otp-ec3672616b5e7b480858e38306653ba9493e4fb9.tar.bz2
otp-ec3672616b5e7b480858e38306653ba9493e4fb9.zip
Check for T flag in failover suite
Diffstat (limited to 'lib/diameter/test/diameter_failover_SUITE.erl')
-rw-r--r--lib/diameter/test/diameter_failover_SUITE.erl12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/diameter/test/diameter_failover_SUITE.erl b/lib/diameter/test/diameter_failover_SUITE.erl
index ed31670031..96d4e954b0 100644
--- a/lib/diameter/test/diameter_failover_SUITE.erl
+++ b/lib/diameter/test/diameter_failover_SUITE.erl
@@ -50,6 +50,7 @@
%% diameter callbacks
-export([pick_peer/4,
prepare_request/3,
+ prepare_retransmit/3,
handle_answer/4,
handle_request/3]).
@@ -90,7 +91,6 @@
{peer_up = false,
peer_down = false,
handle_error = false,
- prepare_retransmit = false,
default = ?MODULE}},
{answer_errors, callback}]}]).
@@ -209,6 +209,13 @@ prepare(#diameter_packet{msg = Req}, Caps) ->
{'Origin-Host', OH},
{'Origin-Realm', OR}]).
+%% prepare_retransmit/3
+
+prepare_retransmit(Pkt, ?CLIENT, {_, _}) ->
+ #diameter_packet{header = #diameter_header{is_retransmitted = true}}
+ = Pkt,
+ {send, Pkt}.
+
%% handle_answer/4
handle_answer(Pkt, _Req, ?CLIENT, _Peer) ->
@@ -219,7 +226,8 @@ handle_answer(Pkt, _Req, ?CLIENT, _Peer) ->
%% Only SERVER3 actually answers.
handle_request(Pkt, ?SERVER3, {_, Caps}) ->
- #diameter_packet{msg = #diameter_base_STR{'Session-Id' = SId,
+ #diameter_packet{header = #diameter_header{is_retransmitted = true},
+ msg = #diameter_base_STR{'Session-Id' = SId,
'Origin-Host' = ?CLIENT}}
= Pkt,
#diameter_caps{origin_host = {OH, _},