K2InformaticsGmbH / smpp_parser

A parser for SMPP protocol PDUs
Apache License 2.0
3 stars 1 forks source link

Reason: assertEqual (1) #52

Closed walter-weinmann closed 6 years ago

walter-weinmann commented 6 years ago
=== Reason: {assertEqual,
                     [{module,smpp_test_utils},
                      {line,49},
                      {expression,"smpp : decode ( E )"},
                      {expected,
                          {ok,#{command_id => <<"cancel_broadcast_sm">>,
                                command_length => 72,
                                command_status => <<"ESME_ROK">>,
                                message_id => <<"this_could_be_a_message_id">>,
                                sequence_number => 1,
                                service_type => <<"USSD">>,
                                source_addr => <<"168.0.0.1">>,
                                source_addr_npi => <<"ERMES">>,
                                source_addr_ton => <<"Abbreviated">>,
                                tlvs =>
                                    [#{len => 2,tag => 516,val => <<"aj">>}],
                                user_message_reference => 49391}}},
                      {value,
                          {ok,#{command_id => <<"cancel_broadcast_sm">>,
                                command_length => 72,
                                command_status => <<"ESME_ROK">>,
                                message_id => <<"this_could_be_a_message_id">>,
                                sequence_number => 1,
                                service_type => <<"USSD">>,
                                source_addr => <<"168.0.0.1">>,
                                source_addr_npi => <<"ERMES">>,
                                source_addr_ton => <<"Abbreviated">>,
                                tlvs =>
                                    [#{len => 2,tag => 516,val => <<"Àï">>}],
                                user_message_reference => 24938}}}]}
  in function  smpp_test_utils:'-encode_decode/1-fun-4-'/2 (d:/K2/smpp_parser_idea/smpp_parser/_build/test/lib/smpp_parser/test/src/smpp_test_utils.erl, line 49)
  in call from compacted_cancel_broadcast_sm_SUITE:test_compacted/1 (d:/K2/smpp_parser_idea/smpp_parser/_build/test/lib/smpp_parser/test/generated/ct/compacted_cancel_broadcast_sm_SUITE.erl, line 49)
  in call from test_server:ts_tc/3 (test_server.erl, line 1546)
  in call from test_server:run_test_case_eval1/6 (test_server.erl, line 1062)
  in call from test_server:run_test_case_eval/9 (test_server.erl, line 994)

Example:

 {"cancel_broadcast_sm_issue_52",
  "00 00 00 48 00 00 01 13 00 00 00 00 00 00 00 01 55 53 53 44 00 74 68 69 73 "
  "5F 63 6F 75 6C 64 5F 62 65 5F 61 5F 6D 65 73 73 61 67 65 5F 69 64 00 06 0A "
  "31 36 38 2E 30 2E 30 2E 31 00 02 04 00 02 C0 EF 02 04 00 02 61 6A"}
c-bik commented 6 years ago

user_message_reference is flipping values in encode -> decode -> encode -> decode...

c-bik commented 6 years ago

user_message_reference TLV was a duplicate in test case: image