fr: Make TC_foo() actually terminate
Rather than running in an endless loop (useful for manual tets),
terminate each UE_CT after sending 50 packets. Also adjust the ramping
and timeouts in a way that it manages to terminate ahead of the guard
timeout.
Change-Id: I7f40f5c59d399d528072986d067b5014fbd085c4
diff --git a/fr/FR_Tests.ttcn b/fr/FR_Tests.ttcn
index 5777856..23c8e26 100644
--- a/fr/FR_Tests.ttcn
+++ b/fr/FR_Tests.ttcn
@@ -122,7 +122,7 @@
}
log ("Entering main loop");
- while (true) {
+ for (var integer num_pkts := 0; num_pkts < 50; num_pkts := num_pkts + 1) {
var integer ran_index := 0;
//BSSGP[ran_index].send(ts_BSSGP_UL_UD(g_pars.tlli, g_pars.bssgp_cell_id[ran_index], llc_enc));
BSSGP[ran_index].send(ts_LLC_UI(f_rnd_octstring(512), '0000'B, '1'B, 0))
@@ -130,7 +130,7 @@
}
}
-function f_start_ue(void_fn fn, charstring id, GbInstance gb, integer imsi_suffix, BSSGP_BVC_CT bvc_comp, float t_guard := 30.0)
+function f_start_ue(void_fn fn, charstring id, GbInstance gb, integer imsi_suffix, BSSGP_BVC_CT bvc_comp, float t_guard := 40.0)
runs on test_CT return UE_CT
{
var UE_CT ue_comp;
@@ -176,7 +176,11 @@
ue := f_start_ue(refers(f_ul_ud), id, g_gb[i], i*10000+j*100+k, bvc_comp);
ues := ues & { ue };
/* a bit of staggering to ensure the timers above don't run all at the same time */
- f_sleep(0.05);
+ f_sleep(0.005);
+ /* FIXME: as the BSSGP emulation is already running, we must not
+ * take too long to start the UE components. If we do, the
+ * BVC_S_UNBLOCKED notification will arrive before the components
+ * all are running, meaning we never get that one :( */
}
}
}