From c9c9e2962f678c7cb429d5a810aa01b7b8456294 Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Mon, 18 May 2020 23:31:40 +0700 Subject: BTS: move ASP_IPA_EVENT_UP handling to f_init_rsl() Change-Id: I2479ce67426810d2789dda885bdbbe82b5d5282a --- bts/BTS_Tests.ttcn | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) (limited to 'bts') diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index d2414964..012df473 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -178,6 +178,8 @@ type component ConnHdlr extends RSL_DchanHdlr, lapdm_test_CT { } function f_init_rsl(charstring id) runs on test_CT { + timer T := mp_ipa_up_timeout; + vc_IPA := IPA_Emulation_CT.create(id & "-RSL-IPA"); vc_RSL := RSL_Emulation_CT.create(id & "-RSL"); @@ -187,6 +189,14 @@ function f_init_rsl(charstring id) runs on test_CT { vc_IPA.start(IPA_Emulation.main_server(mp_rsl_ip, mp_rsl_port)); vc_RSL.start(RSL_Emulation.main(false)); + + T.start; + alt { + [] RSL_CCHAN.receive(tr_ASP_IPA_EV(ASP_IPA_EVENT_UP)); + [] T.timeout { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Timeout waiting for ASP_IPA_EVENT_UP"); + } + } } type record ConnHdlrPars { @@ -375,7 +385,6 @@ private function f_init_trxc(TRXC_CODEC_PT pt, charstring id, /* global init function */ function f_init() runs on test_CT { var charstring id := testcasename(); - timer T := mp_ipa_up_timeout; g_AllChannels := { /* TS 1..4: TCH/F */ valueof(ts_RslChanNr_Bm(1)), valueof(ts_RslChanNr_Bm(2)), @@ -415,13 +424,6 @@ function f_init() runs on test_CT { }; } f_init_rsl(id); - T.start; - alt { - [] RSL_CCHAN.receive(tr_ASP_IPA_EV(ASP_IPA_EVENT_UP)); - [] T.timeout { - Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Timeout waiting for ASP_IPA_EVENT_UP"); - } - } f_sleep(0.5); /* workaround for OS#3000 */ f_init_vty(id); f_ipa_ctrl_start(mp_ctrl_ip, mp_ctrl_port); @@ -4950,17 +4952,8 @@ runs on test_CT return boolean { /* Make sure that GPRS Indicator is absent when the PCU is not connected */ private function f_TC_pcu_socket_noconnect(RrMessageType si_type) runs on test_CT { - timer T := 5.0; - /* don't call f_init() as this would connect PCU socket */ f_init_rsl(testcasename()); - T.start; - alt { - [] RSL_CCHAN.receive(tr_ASP_IPA_EV(ASP_IPA_EVENT_UP)); - [] T.timeout { - Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "Timeout waiting for ASP_IPA_EVENT_UP"); - } - } /* Send both System Information Type 3 and 4 (with GPRS Indicator) */ f_rsl_bcch_fill(RSL_SYSTEM_INFO_3, ts_SI3_default); -- cgit v1.2.3