Change in osmo-ttcn3-hacks[master]: remsim: Add client TC_bank_disconnect + TC_bank_disconnect_reconnect

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.org
Sun Feb 16 15:34:12 UTC 2020


laforge has uploaded this change for review. ( 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(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/90/17190/1

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-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200216/f4e4a0cd/attachment.htm>


More information about the gerrit-log mailing list