pgw: Add T_guard

Change-Id: I9dce4aee4a0b1181bb7dc1a53fb254e6d17cf22e
This commit is contained in:
Pau Espin 2022-04-07 19:05:15 +02:00
parent a47a8c60ee
commit 08880f11e9
1 changed files with 14 additions and 1 deletions

View File

@ -40,6 +40,16 @@ type component PGW_Test_CT {
var DIAMETER_Emulation_CT vc_DIAMETER;
port DIAMETER_PT DIAMETER_UNIT;
port DIAMETEREM_PROC_PT DIAMETER_PROC;
/* global test case guard timer (actual timeout value is set in f_init()) */
timer T_guard;
}
/* global altstep for global guard timer; */
altstep as_Tguard() runs on PGW_Test_CT {
[] T_guard.timeout {
setverdict(fail, "Timeout of T_guard");
mtc.stop;
}
}
/* per-session component; we typically have 1..N per testcase */
@ -138,7 +148,10 @@ friend function f_init_diameter(charstring id) runs on PGW_Test_CT {
f_diameter_wait_capability(DIAMETER_UNIT);
}
private function f_init() runs on PGW_Test_CT {
private function f_init(float guard_timeout := 60.0) runs on PGW_Test_CT {
T_guard.start(guard_timeout);
activate(as_Tguard());
var Gtp2EmulationCfg cfg := {
gtpc_bind_ip := mp_local_hostname_c,
gtpc_bind_port := GTP2C_PORT,