From 6aaeccf09373e374665fb7348917530b2ead46af Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Wed, 6 Mar 2019 15:32:26 +0100 Subject: 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 --- msc/MSC_Tests.ttcn | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn index 1edc7ad2..06dad474 100644 --- a/msc/MSC_Tests.ttcn +++ b/msc/MSC_Tests.ttcn @@ -1973,7 +1973,7 @@ testcase TC_lu_and_mo_sms() runs on MTC_CT { } 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 @@ private function f_tc_lu_and_mt_sms(charstring id, BSC_ConnHdlrPars pars) runs o } 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 @@ testcase TC_lu_and_mt_sms() runs on MTC_CT { 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 @@ private function f_tc_lu_and_mt_sms_paging_and_nothing(charstring id, BSC_ConnHd } 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 @@ testcase TC_lu_and_mt_sms_paging_and_nothing() runs on MTC_CT { 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; } -- cgit v1.2.3