cbc: Add Tguard
Change-Id: I92b0a2ec931cefed34a33bd90cbc5c97d0aec540
This commit is contained in:
parent
ae2e51557f
commit
7e45128ec0
|
@ -46,6 +46,7 @@ const integer MAX_BSC := 3;
|
|||
const integer MAX_MME := 3;
|
||||
|
||||
type component test_CT extends CBSP_Adapter_CT, http_CT {
|
||||
timer g_Tguard := 60.0;
|
||||
var integer g_num_bsc;
|
||||
var integer g_num_mme;
|
||||
var BSC_ConnHdlr g_vc_conn_BSC[MAX_BSC];
|
||||
|
@ -68,6 +69,15 @@ private function f_shutdown_helper() runs on test_CT {
|
|||
mtc.stop;
|
||||
}
|
||||
|
||||
/* altstep for the global guard timer */
|
||||
private altstep as_Tguard() runs on test_CT {
|
||||
[] g_Tguard.timeout {
|
||||
setverdict(fail, "Tguard timeout");
|
||||
all component.stop;
|
||||
mtc.stop;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* BSC Conn Handler:
|
||||
*/
|
||||
|
@ -151,7 +161,11 @@ private function f_init(integer num_bsc := 0, integer num_mme := 0) runs on test
|
|||
}
|
||||
}
|
||||
|
||||
function f_start() runs on test_CT {
|
||||
function f_start(float t_guard := 60.0) runs on test_CT {
|
||||
/* Start guard timer and activate it as default */
|
||||
g_Tguard.start(t_guard);
|
||||
activate(as_Tguard());
|
||||
|
||||
for (var integer i := 0; i < g_num_bsc; i := i + 1) {
|
||||
f_start_bsc(i, testcasename(), g_pars_BSC[i]);
|
||||
}
|
||||
|
@ -195,7 +209,7 @@ private function f_bsc_TC_rx_keepalive_timeout() runs on BSC_ConnHdlr {
|
|||
testcase TC_rx_keepalive_timeout() runs on test_CT {
|
||||
f_init(num_bsc := 1);
|
||||
g_pars_BSC[0].start_fn := refers(f_bsc_TC_rx_keepalive_timeout);
|
||||
f_start();
|
||||
f_start(t_guard := 100.0);
|
||||
f_shutdown_helper();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue