msc: add as_optional_cc_rel to ignore CC REL during call abort tests
When aborting a call with a Clear Request, it is actually a good idea to
release an ongoing call with a CC Release message from the MSC. Allow this.
Change-Id: I8378f7602fecac8262b31b47ad9327a3782c1bcd
diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index 7129f81..1edc7ad 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -152,6 +152,10 @@
}
}
+private altstep as_optional_cc_rel(CallParameters cpars) runs on BSC_ConnHdlr {
+ [] BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_RELEASE(cpars.transaction_id))) { repeat; };
+}
+
function f_init_smpp(charstring id) runs on MTC_CT {
id := id & "-SMPP";
var EsmePars pars := {
@@ -1267,7 +1271,13 @@
BSSAP.send(ts_PDU_DTAP_MO(ts_ML3_MO_CC_SETUP(cpars.transaction_id, cpars.called_party)));
+ var default ccrel := activate(as_optional_cc_rel(cpars));
+
f_expect_clear(185.0);
+
+ deactivate(ccrel);
+
+ f_sleep(1.0);
}
testcase TC_mo_setup_and_nothing() runs on MTC_CT {
var BSC_ConnHdlr vc_conn;
@@ -1477,7 +1487,6 @@
setverdict(fail, "Timeout waiting for channel release");
mtc.stop;
}
- [] BSSAP.receive { repeat; }
[] MNCC.receive { repeat; }
[] GSUP.receive { repeat; }
[] MGCP.receive(tr_DLCX(?)) -> value mgcp_cmd {
@@ -1487,6 +1496,7 @@
}
[] MGCP.receive { repeat; }
[] as_clear_cmd_compl_disc();
+ [] as_optional_cc_rel(cpars);
}
}
testcase TC_mt_crcx_ran_reject() runs on MTC_CT {
@@ -1873,13 +1883,11 @@
/* Drop CRCX */
MGCP.receive(tr_CRCX) -> value mgcp_cmd;
- /* Drop DTAP Release */
- BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_RELEASE(cpars.transaction_id)));
-
- /* Drop resent DTAP Release */
- BSSAP.receive(tr_PDU_DTAP_MT(tr_ML3_MT_CC_RELEASE(cpars.transaction_id)));
+ var default ccrel := activate(as_optional_cc_rel(cpars));
f_expect_clear(60.0);
+
+ deactivate(ccrel);
}
testcase TC_mo_release_timeout() runs on MTC_CT {
var BSC_ConnHdlr vc_conn;
@@ -3154,10 +3162,16 @@
f_sleep(1.0);
BSSAP.send(ts_BSSMAP_ClearRequest(0));
- MNCC.receive(tr_MNCC_REL_ind(?, ?)) -> value mncc;
+ var default ccrel := activate(as_optional_cc_rel(cpars));
- BSSAP.receive(tr_BSSMAP_ClearCommand);
- BSSAP.send(ts_BSSMAP_ClearComplete);
+ interleave {
+ [] MNCC.receive(tr_MNCC_REL_ind(?, ?)) { };
+ [] BSSAP.receive(tr_BSSMAP_ClearCommand) {
+ BSSAP.send(ts_BSSMAP_ClearComplete);
+ };
+ }
+
+ deactivate(ccrel);
f_sleep(1.0);
}