This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17190 ) Change subject: remsim: Add client TC_bank_disconnect + TC_bank_disconnect_reconnect ...................................................................... remsim: Add client TC_bank_disconnect + TC_bank_disconnect_reconnect This extends remsim-client test coverage to situations where the server removes an existing/established mapping, and possibly later establishes a new mapping. Change-Id: I8df29a91718b6b2829415fc040b647a58eb71292 Related: OS#4399 --- M remsim/RemsimClient_Tests.ttcn 1 file changed, 62 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/remsim/RemsimClient_Tests.ttcn b/remsim/RemsimClient_Tests.ttcn index 7bee899..d950152 100644 --- a/remsim/RemsimClient_Tests.ttcn +++ b/remsim/RemsimClient_Tests.ttcn @@ -109,6 +109,66 @@ f_sleep(1.0); } +/* Test if client disconnects from bankd after slotmap delete on server */ +testcase TC_bank_disconnect() runs on client_test_CT { + var BankSlot bslot := { 1, 0 }; + f_init(); + /* expect inbound connectClientReq */ + as_connectClientReq(); + /* configure client to connect to [simulated] bankd */ + f_rspro_config_client_bank(bslot, ts_IpPort(ts_IPv4(mp_bankd_ip), mp_bankd_port)); + /* expect inbound connect on simulated bankd */ + f_rspro_srv_exp_connect(1); + /* expect inbound connectClientReq on simulated bankd */ + as_connectClientReq(i := 1); + + f_sleep(1.0); + + /* configure client to disconnect from [simulated] bankd */ + f_rspro_config_client_bank(bslot, ts_IpPort(ts_IPv4("0.0.0.0"), 0)); + + /* expect disconnect of client on simulated bankd side */ + RSPRO_SRV[1].receive(t_ASP_IPA_EVT_UD(ASP_IPA_EVENT_DOWN)); + setverdict(pass); +} + +/* Test if client connects to bankd after disconnects from bankd after slotmap delete on server */ +testcase TC_bank_disconnect_reconnect() runs on client_test_CT { + var BankSlot bslot := { 1, 0 }; + f_init(); + /* expect inbound connectClientReq */ + as_connectClientReq(); + /* configure client to connect to [simulated] bankd */ + f_rspro_config_client_bank(bslot, ts_IpPort(ts_IPv4(mp_bankd_ip), mp_bankd_port)); + /* expect inbound connect on simulated bankd */ + f_rspro_srv_exp_connect(1); + /* expect inbound connectClientReq on simulated bankd */ + as_connectClientReq(i := 1); + + f_sleep(1.0); + + /* configure client to disconnect from [simulated] bankd */ + f_rspro_config_client_bank(bslot, ts_IpPort(ts_IPv4("0.0.0.0"), 0)); + + /* expect disconnect of client on simulated bankd side */ + RSPRO_SRV[1].receive(t_ASP_IPA_EVT_UD(ASP_IPA_EVENT_DOWN)); + + /* re-start the IPA emulation (which terminated itself on the TCP disconnect */ + f_rspro_srv_init(1, mp_bankd_ip, mp_bankd_port, g_bankd_comp_id, exp_connect := false); + + /* configure client to connect to [simulated] bankd */ + f_rspro_config_client_bank(bslot, ts_IpPort(ts_IPv4(mp_bankd_ip), mp_bankd_port)); + + /* expect inbound connect on simulated bankd */ + f_rspro_srv_exp_connect(1); + + /* expect inbound connect on simulated bankd */ + as_connectClientReq(i := 1); + + setverdict(pass); +} + + /* TODO: * send a configClientBankIpReq and change the bank of an active client * send a configClientBankSlotReq and chagne the bank slot of an active client @@ -125,6 +185,8 @@ execute( TC_srv_connectClient_configClientBank() ); execute( TC_srv_reconnect() ); execute( TC_bank_reconnect() ); + execute( TC_bank_disconnect() ); + execute( TC_bank_disconnect_reconnect() ); } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17190 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I8df29a91718b6b2829415fc040b647a58eb71292 Gerrit-Change-Number: 17190 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge at osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200217/9dbc94b2/attachment.htm>