BSC_Tests: fix TC_lost_sdcch_during_assignment (SCCPlite)
When running ttcn3-bsc-test against osmo-bsc in SCCPlite mode,
TC_lost_sdcch_during_assignment fails with the following output:
Local verdict of MTC: fail reason: "Timeout of T_guard"
Final verdict of PTC: fail reason: "Unexpected DLCX received"
One key problem is that in f_TC_lost_sdcch_during_assignment() we
expect to receive a DLCX message on port MGCP, but somehow it gets
caught by the as_Media_mgw earlier than we attempt to receive it.
* Fix this race condition by activating the as_Media_mgw with
fail_on_dlcx := false, so that it does not catch DLCX messages.
Another problem is that for SCCPlite we're running the MGCP_Emulation
component with multi_conn_mode=true, so that all MGCP messages are
arriving at port MGCP_MULTI (not MGCP) wrapped into MGCP_RecvFrom.
* Expect the DLCX message on either of the two ports depending
on the value of g_pars.aoip (AoIP or SCCPlite mode).
This change makes BSC_Tests.TC_lost_sdcch_during_assignment pass.
Change-Id: If4807d3d7d196682f7f22732ad47bcbb72858ed3
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 2e804e1..d9b178f 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -11283,7 +11283,7 @@
/* we should now have a COMPL_L3 at the MSC */
f_create_mgcp_expect(ExpectCriteria:{omit,omit,omit});
- activate(as_Media_mgw());
+ activate(as_Media_mgw(fail_on_dlcx := false));
var RslChannelNr chan_nr := { u := { ch0 := RSL_CHAN_NR_Bm_ACCH }, tn := 1 };
f_rslem_register(0, chan_nr);
@@ -11312,9 +11312,18 @@
BSSAP.send(RAN_Conn_Prim:MSC_CONN_PRIM_DISC_REQ);
var MgcpCommand mgcp;
- MGCP.receive(tr_DLCX()) -> value mgcp {
- MGCP.send(ts_DLCX_ACK2(mgcp.line.trans_id));
- };
+ var MGCP_RecvFrom mrf;
+ var template MgcpMessage msg_dlcx := { command := tr_DLCX };
+ alt {
+ [g_pars.aoip] MGCP.receive(tr_DLCX) -> value mgcp {
+ MGCP.send(ts_DLCX_ACK2(mgcp.line.trans_id));
+ }
+ [not g_pars.aoip] MGCP_MULTI.receive(tr_MGCP_RecvFrom_any(msg_dlcx)) -> value mrf {
+ MGCP_MULTI.send(t_MGCP_SendToMrf(mrf, MgcpMessage:{
+ response := ts_DLCX_ACK2(mrf.msg.command.line.trans_id)
+ }));
+ }
+ }
f_sleep(0.5);
}