diff options
author | Anders Svensson <[email protected]> | 2012-11-08 12:55:44 +0100 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2012-11-08 12:55:44 +0100 |
commit | 1262a7cadb69ee503bb5c2586038059b00595c99 (patch) | |
tree | a62327809e844a7a9d08f20a7d1f51754bb6b8b0 /lib/diameter/test/diameter_traffic_SUITE.erl | |
parent | acdfec8baf27093b59cd25ffbc84e6165f9bb427 (diff) | |
parent | bcc2e7751b014d4fc9d45c4a138278cbd00cc222 (diff) | |
download | otp-1262a7cadb69ee503bb5c2586038059b00595c99.tar.gz otp-1262a7cadb69ee503bb5c2586038059b00595c99.tar.bz2 otp-1262a7cadb69ee503bb5c2586038059b00595c99.zip |
Merge branch 'anders/diameter/sequence_masks/OTP-10445' into maint
* anders/diameter/sequence_masks/OTP-10445:
Redo watchdog test suite
Update/clarify some comments
Add reopen message from watchdog
Add options service_info
Add diameter_reg:wait/1
Clarify diameter_transport doc
Remove pre-OTP configure support
Remove obsolete make target
Use sequence masks in test suites
Implement sequence masks
Document sequence masks
Diffstat (limited to 'lib/diameter/test/diameter_traffic_SUITE.erl')
-rw-r--r-- | lib/diameter/test/diameter_traffic_SUITE.erl | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/diameter/test/diameter_traffic_SUITE.erl b/lib/diameter/test/diameter_traffic_SUITE.erl index dd07679764..863d16e792 100644 --- a/lib/diameter/test/diameter_traffic_SUITE.erl +++ b/lib/diameter/test/diameter_traffic_SUITE.erl @@ -108,6 +108,9 @@ -define(BASE, ?DIAMETER_DICT_COMMON). -define(ACCT, ?DIAMETER_DICT_ACCOUNTING). +%% Sequence mask for End-to-End and Hop-by-Hop identifiers. +-define(CLIENT_MASK, {1,26}). %% 1 in top 6 bits + %% Run tests cases in different encoding variants. Send outgoing %% messages as lists or records. -define(ENCODINGS, [list, record]). @@ -244,7 +247,8 @@ start(_Config) -> start_services(_Config) -> ok = diameter:start_service(?SERVER, ?SERVICE(?SERVER)), - ok = diameter:start_service(?CLIENT, ?SERVICE(?CLIENT)). + ok = diameter:start_service(?CLIENT, [{sequence, ?CLIENT_MASK} + | ?SERVICE(?CLIENT)]). add_transports(Config) -> LRef = ?util:listen(?SERVER, tcp, [{capabilities_cb, fun capx/2}]), @@ -736,7 +740,13 @@ handle_error(Reason, _Req, ?CLIENT, _Peer, _Name) -> %% Note that diameter will set Result-Code and Failed-AVPs if %% #diameter_packet.errors is non-null. -handle_request(#diameter_packet{msg = M}, ?SERVER, {_Ref, Caps}) -> +handle_request(#diameter_packet{header = H, msg = M}, ?SERVER, {_Ref, Caps}) -> + #diameter_header{end_to_end_id = EI, + hop_by_hop_id = HI} + = H, + {V,B} = ?CLIENT_MASK, + V = EI bsr B, %% assert + V = HI bsr B, %% request(M, Caps). request(#diameter_base_accounting_ACR{'Accounting-Record-Number' = 0}, |