BTS: move ASP_IPA_EVENT_UP handling to f_init_rsl()
Change-Id: I2479ce67426810d2789dda885bdbbe82b5d5282a
diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index d241496..012df47 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -178,6 +178,8 @@
}
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 @@
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 @@
/* 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 @@
};
}
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 @@
/* 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);