laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38214?usp=email )
(
5 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: s1gw: add f_ConnHdlrList_all_done() ......................................................................
s1gw: add f_ConnHdlrList_all_done()
Change-Id: I20c472dd8ce7f5a25c349cc079bd5bd873be2950 --- M s1gw/S1GW_Tests.ttcn 1 file changed, 10 insertions(+), 6 deletions(-)
Approvals: pespin: Looks good to me, approved Jenkins Builder: Verified
diff --git a/s1gw/S1GW_Tests.ttcn b/s1gw/S1GW_Tests.ttcn index 4120f2a..940944a 100644 --- a/s1gw/S1GW_Tests.ttcn +++ b/s1gw/S1GW_Tests.ttcn @@ -188,6 +188,14 @@ return vc_conn; }
+/* wait for all ConnHdlr in the given list to be .done() */ +function f_ConnHdlrList_all_done(in ConnHdlrList vc_conns) +runs on test_CT { + for (var integer i := 0; i < lengthof(vc_conns); i := i + 1) { + vc_conns[i].done; + } +} + function f_TC_setup(charstring id) runs on ConnHdlr { f_ConnHdlr_s1ap_register(g_pars.genb_id);
@@ -243,9 +251,7 @@ vc_conns[i] := f_ConnHdlr_spawn(refers(f_TC_setup_multi), pars); }
- for (var integer i := 0; i < mp_multi_enb_num; i := i + 1) { - vc_conns[i].done; - } + f_ConnHdlrList_all_done(vc_conns); }
@@ -317,9 +323,7 @@ vc_conns[i] := f_ConnHdlr_spawn(refers(f_TC_e_rab_setup), pars); }
- for (var integer i := 0; i < num_enbs; i := i + 1) { - vc_conns[i].done; - } + f_ConnHdlrList_all_done(vc_conns); } /* 1 E-RAB at a time, single eNB */ testcase TC_e_rab_setup() runs on test_CT {