From 340e832013daabadd7b85fa6b3e08d34cf17a4a4 Mon Sep 17 00:00:00 2001 From: Anders Svensson Date: Thu, 1 Jan 2015 11:57:00 +0100 Subject: 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. --- lib/diameter/test/diameter_traffic_SUITE.erl | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'lib/diameter/test') 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. -- cgit v1.2.3