Change in ...osmo-ttcn3-hacks[master]: mgw: add connection timeout test

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/.

osmith gerrit-no-reply at lists.osmocom.org
Thu Jun 27 07:06:11 UTC 2019


osmith has submitted this change and it was merged. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14605 )

Change subject: mgw: add connection timeout test
......................................................................

mgw: add connection timeout test

Change-Id: I020b682b347045818fd28de240daa0aa33fe43b4
---
M mgw/MGCP_Test.ttcn
1 file changed, 40 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved



diff --git a/mgw/MGCP_Test.ttcn b/mgw/MGCP_Test.ttcn
index 31c2a1d..aeb6ef8 100644
--- a/mgw/MGCP_Test.ttcn
+++ b/mgw/MGCP_Test.ttcn
@@ -91,6 +91,7 @@
 		f_vty_transceive(MGWVTY, "enable");
 
 		f_vty_enable_osmux(osmux_on);
+		f_vty_config(MGWVTY, "mgcp", "conn-timeout 0");
 	}
 
 	private function f_rtpem_init(inout RTP_Emulation_CT comp_ref, integer i)
@@ -2066,6 +2067,43 @@
 	/* TODO: AUCX (various) */
 	/* TODO: invalid verb (various) */
 
+
+	testcase TC_conn_timeout() runs on dummy_CT {
+		var RtpFlowData flow;
+		var MgcpEndpoint ep := c_mgw_ep_rtpbridge & "1@" & c_mgw_domain;
+		var MgcpCallId call_id := '1225'H;
+		var MGCP_RecvFrom mrf;
+
+		f_init(ep);
+		log("Setting conn-timeout to 1s");
+		f_vty_config(MGWVTY, "mgcp", "conn-timeout 1"); /* reset in f_init_vty() */
+
+		log("Sending RTP data for 1.5s");
+		flow := valueof(t_RtpFlow(mp_local_ip, mp_remote_ip, 111, "GSM-HR-08/8000/1"));
+		flow.em.portnr := 10000;
+		f_flow_create(RTPEM[0], ep, call_id, "loopback", flow);
+		f_rtpem_mode(RTPEM[0], RTPEM_MODE_BIDIR);
+		f_sleep(1.5);
+
+		log("Stopping for 0.5s and resuming");
+		f_rtpem_mode(RTPEM[0], RTPEM_MODE_NONE);
+		f_sleep(0.5);
+		f_rtpem_mode(RTPEM[0], RTPEM_MODE_BIDIR);
+		f_sleep(0.1);
+
+		log("Stopping for 1.5s, expecting to run into timeout");
+		f_rtpem_mode(RTPEM[0], RTPEM_MODE_NONE);
+		f_sleep(1.5);
+
+		log("Resuming should fail now");
+		f_rtpem_conn_refuse_expect(RTPEM[0]);
+		f_rtpem_mode(RTPEM[0], RTPEM_MODE_BIDIR);
+		f_sleep(0.2);
+		f_rtpem_conn_refuse_verify(RTPEM[0]);
+
+		setverdict(pass);
+	}
+
 	control {
 		execute(TC_selftest());
 		execute(TC_crcx());
@@ -2119,5 +2157,7 @@
 		execute(TC_amr_oa_bwe_rtp_conversion());
 		execute(TC_amr_oa_oa_rtp_conversion());
 		execute(TC_amr_bwe_bwe_rtp_conversion());
+
+		execute(TC_conn_timeout());
 	}
 }

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14605
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: I020b682b347045818fd28de240daa0aa33fe43b4
Gerrit-Change-Number: 14605
Gerrit-PatchSet: 3
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at gnumonks.org>
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190627/8debcc9b/attachment.htm>


More information about the gerrit-log mailing list