msc: move sms sending to BSC_ConnHdlr and send from within test flow
For the sole reason that f_vty_sms_send() was put on MTC_CT for no apparent
reason, we start the test function and send an SMS with an arbitrary two
seconds delay.
Instead move it to BSC_ConnHdlr and place SMS sending in the actual test
function flow where it belongs.
Change-Id: I5f348b3d30342b7c4871a1fc8f94648923e82eea
diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index 1edc7ad..06dad47 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -1973,7 +1973,7 @@
}
private function f_vty_sms_send(charstring imsi, charstring msisdn, charstring text)
-runs on MTC_CT {
+runs on BSC_ConnHdlr {
f_vty_transceive(MSCVTY, "subscriber imsi "&imsi&" sms sender msisdn "&msisdn&" send "&text);
}
@@ -1995,7 +1995,7 @@
}
f_bssmap_register_imsi(g_pars.imsi, tmsi);
- /* FIXME: actually cause MSC to send a SMS via VTY or SMPP */
+ f_vty_sms_send(hex2str(pars.imsi), "2342", "Hello SMS");
/* MSC->BSC: expect PAGING from MSC */
BSSAP.receive(tr_BSSMAP_Paging(g_pars.imsi));
@@ -2013,8 +2013,6 @@
f_init();
pars := f_init_pars(43);
vc_conn := f_start_handler_with_pars(refers(f_tc_lu_and_mt_sms), pars);
- f_sleep(2.0);
- f_vty_sms_send(hex2str(pars.imsi), "2342", "Hello SMS");
vc_conn.done;
}
@@ -2036,6 +2034,8 @@
}
f_bssmap_register_imsi(g_pars.imsi, tmsi);
+ f_vty_sms_send(hex2str(pars.imsi), "2342", "Hello SMS");
+
/* Expect the MSC to page exactly 10 times before giving up */
alt {
[] BSSAP.receive(tr_BSSMAP_Paging(g_pars.imsi))
@@ -2079,8 +2079,6 @@
f_init();
pars := f_init_pars(1843);
vc_conn := f_start_handler_with_pars(refers(f_tc_lu_and_mt_sms_paging_and_nothing), pars);
- f_sleep(2.0);
- f_vty_sms_send(hex2str(pars.imsi), "2342", "Hello SMS");
vc_conn.done;
}