aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/test
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2015-01-01 11:57:00 +0100
committerAnders Svensson <[email protected]>2015-02-25 17:00:13 +0100
commit340e832013daabadd7b85fa6b3e08d34cf17a4a4 (patch)
tree89d51a32f681590c649da15686feb45652c0bf38 /lib/diameter/test
parent3ecaab1ab162cd07dc245d0981454feb1b72265f (diff)
downloadotp-340e832013daabadd7b85fa6b3e08d34cf17a4a4.tar.gz
otp-340e832013daabadd7b85fa6b3e08d34cf17a4a4.tar.bz2
otp-340e832013daabadd7b85fa6b3e08d34cf17a4a4.zip
Fix error matching in traffic suite
Clause matching error for specific test cases was harmless since the subsequent clause also matched. Errors detected by the server result in Failed-AVP being sent, which should not lead to a decode error in the client.
Diffstat (limited to 'lib/diameter/test')
-rw-r--r--lib/diameter/test/diameter_traffic_SUITE.erl11
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/diameter/test/diameter_traffic_SUITE.erl b/lib/diameter/test/diameter_traffic_SUITE.erl
index 92c81d2d18..03815f283e 100644
--- a/lib/diameter/test/diameter_traffic_SUITE.erl
+++ b/lib/diameter/test/diameter_traffic_SUITE.erl
@@ -1058,19 +1058,12 @@ answer(Pkt, Req, _Peer, Name, #group{client_dict0 = Dict0}) ->
[R | Vs] = Dict:'#get-'(answer(Ans, Es, Name)),
[Dict:rec2msg(R) | Vs].
+%% An inappropriate E-bit results in a decode error ...
answer(Rec, Es, send_bad_answer) ->
[{5004, #diameter_avp{name = 'Result-Code'}} | _] = Es,
Rec;
-answer(Rec, [_|_], N)
- when N == send_long_avp_length;
- N == send_short_avp_length;
- N == send_zero_avp_length;
- N == send_invalid_avp_length;
- N == send_invalid_reject;
- N == send_unknown_short_mandatory;
- N == send_unexpected_mandatory_decode ->
- Rec;
+%% ... while other errors are reflected in Failed-AVP.
answer(Rec, [], _) ->
Rec.