bsc: undup f_verify_active_layer3()
Change-Id: Ia4433618787b58f8789c9e97cdfbb8b320a09395
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index 3a817f4..9672357 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -4464,6 +4464,25 @@
f_shutdown_helper();
}
+private function f_verify_active_layer3() runs on MSC_ConnHdlr
+{
+ /* The old lchan and conn should still be active. See that arbitrary L3
+ * is still going through. */
+ var octetstring l3 := '0123456789'O;
+ RSL.send(ts_RSL_DATA_IND(g_chan_nr, valueof(ts_RslLinkID_DCCH(0)), l3));
+ var template PDU_BSSAP exp_data := {
+ discriminator := '1'B,
+ spare := '0000000'B,
+ dlci := '00'O,
+ lengthIndicator := 5,
+ pdu := {
+ dtap := l3
+ }
+ };
+ BSSAP.receive(exp_data);
+ setverdict(pass);
+}
+
/* BSC asks for inter-BSC HO, but the MSC decides that it won't happen and
* simply never sends a BSSMAP Handover Command. */
private function f_tc_ho_out_fail_no_msc_response(charstring id) runs on MSC_ConnHdlr {
@@ -4484,21 +4503,7 @@
* Let's give it a bit extra. */
f_sleep(15.0);
- /* The old lchan and conn should still be active. See that arbitrary L3
- * is still going through. */
- var octetstring l3 := '0123456789'O;
- RSL.send(ts_RSL_DATA_IND(g_chan_nr, valueof(ts_RslLinkID_DCCH(0)), l3));
- var template PDU_BSSAP exp_data := {
- discriminator := '1'B,
- spare := '0000000'B,
- dlci := '00'O,
- lengthIndicator := 5,
- pdu := {
- dtap := l3
- }
- };
- BSSAP.receive(exp_data);
- setverdict(pass);
+ f_verify_active_layer3();
f_sleep(1.0);
}
testcase TC_ho_out_fail_no_msc_response() runs on test_CT {
@@ -4576,21 +4581,7 @@
f_sleep(1.0);
- /* The old lchan and conn should still be active. See that arbitrary L3
- * is still going through. */
- var octetstring l3 := '0123456789'O;
- RSL.send(ts_RSL_DATA_IND(g_chan_nr, valueof(ts_RslLinkID_DCCH(0)), l3));
- var template PDU_BSSAP exp_data := {
- discriminator := '1'B,
- spare := '0000000'B,
- dlci := '00'O,
- lengthIndicator := 5,
- pdu := {
- dtap := l3
- }
- };
- BSSAP.receive(exp_data);
- setverdict(pass);
+ f_verify_active_layer3();
f_sleep(1.0);
setverdict(pass);