pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38679?usp=email )


Change subject: hnbgw: Introduce test TC_rab_assignment_concurrent
......................................................................

hnbgw: Introduce test TC_rab_assignment_concurrent

Related: SYS#6602
Change-Id: I1f717edbe4a758288d017861c4b77836c5811040
---
M hnbgw/HNBGW_Tests.ttcn
M hnbgw/expected-results.xml
2 files changed, 44 insertions(+), 3 deletions(-)



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

diff --git a/hnbgw/HNBGW_Tests.ttcn b/hnbgw/HNBGW_Tests.ttcn
index 78f0a10..aecd67c 100644
--- a/hnbgw/HNBGW_Tests.ttcn
+++ b/hnbgw/HNBGW_Tests.ttcn
@@ -1056,11 +1056,10 @@
        f_shutdown_helper();
 }

-friend function f_tc_rab_assignment(charstring id) runs on ConnHdlr {
+private function f_tc_rab_assignment(charstring id) runs on ConnHdlr {
        const charstring hnb0_ctr_prefix := mp_statsd_prefix & 
"hnb.001-01-L2342-R0-S55-C1.";
        var MgcpCommand mgcp_cmd;
        var RANAP_PDU tx;
-       timer T := 5.0;

        f_statsd_reset();

@@ -1086,7 +1085,6 @@

        f_cn_iu_release_procedure(mgcp_teardown := true);
 }
-
 testcase TC_rab_assignment() runs on test_CT {
        var ConnHdlr vc_conn;
        g_num_hnbs := 1;
@@ -1098,6 +1096,47 @@
        f_shutdown_helper();
 }

+/* Same as TC_rab_assignment, but 16 subscribers in parallel.
+ * Currently 16 is the maximum we can create due to array sizes of 
RAN_Emulation.ttcn.
+ * Stats are removed since it's difficult to count with several conns 
concurrently doing stuff.
+ */
+private function f_tc_rab_assignment_concurrent(charstring id) runs on 
ConnHdlr {
+       const charstring hnb0_ctr_prefix := mp_statsd_prefix & 
"hnb.001-01-L2342-R0-S55-C1.";
+       var MgcpCommand mgcp_cmd;
+       var RANAP_PDU tx;
+
+       f_statsd_reset();
+
+       tx := f_build_initial_ue(g_pars);
+       f_iuh2iu_connect(tx);
+
+       f_create_rab_cs();
+
+       /* Wait some time with connection up */
+       f_sleep(2.0);
+
+       f_cn_iu_release_procedure(mgcp_teardown := true);
+}
+testcase TC_rab_assignment_concurrent() runs on test_CT {
+       var ConnHdlrList vc_conn_list := {};
+       g_num_hnbs := 1;
+       f_init();
+       f_sleep(1.0);
+       const integer num_conns := 16;
+
+       for (var integer i := 0; i < num_conns; i := i + 1) {
+               var ConnHdlr vc_conn;
+               vc_conn := 
f_start_handler_with_pars(refers(f_tc_rab_assignment_concurrent), 
f_TestHdlrParams(i));
+               vc_conn_list := vc_conn_list & { vc_conn };
+       }
+
+       for (var integer i := 0; i < lengthof(vc_conn_list); i := i + 1) {
+               vc_conn_list[i].done;
+       }
+
+       f_shutdown_helper();
+}
+
 friend function f_tc_rab_assign_fail(charstring id) runs on ConnHdlr {
        const charstring hnb0_ctr_prefix := mp_statsd_prefix & 
"hnb.001-01-L2342-R0-S55-C1.";
        var MgcpCommand mgcp_cmd;
@@ -2399,6 +2438,7 @@
        execute(TC_ranap_cs_bidir());
        execute(TC_ranap_ps_bidir());
        execute(TC_rab_assignment());
+       execute(TC_rab_assignment_concurrent());
        execute(TC_rab_release());
        execute(TC_rab_release_abnormal());
        execute(TC_rab_assign_fail());
diff --git a/hnbgw/expected-results.xml b/hnbgw/expected-results.xml
index 338bf4e..61acf6a 100644
--- a/hnbgw/expected-results.xml
+++ b/hnbgw/expected-results.xml
@@ -15,6 +15,7 @@
   <testcase classname='HNBGW_Tests' name='TC_ranap_cs_bidir' time='MASKED'/>
   <testcase classname='HNBGW_Tests' name='TC_ranap_ps_bidir' time='MASKED'/>
   <testcase classname='HNBGW_Tests' name='TC_rab_assignment' time='MASKED'/>
+  <testcase classname='HNBGW_Tests' name='TC_rab_assignment_concurrent' 
time='MASKED'/>
   <testcase classname='HNBGW_Tests' name='TC_rab_release' time='MASKED'/>
   <testcase classname='HNBGW_Tests' name='TC_rab_release_abnormal' 
time='MASKED'/>
   <testcase classname='HNBGW_Tests' name='TC_rab_assign_fail' time='MASKED'/>

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38679?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I1f717edbe4a758288d017861c4b77836c5811040
Gerrit-Change-Number: 38679
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>

Reply via email to