diff --git a/pgw/PGW_Tests.ttcn b/pgw/PGW_Tests.ttcn index d9f497983..a65ca4351 100644 --- a/pgw/PGW_Tests.ttcn +++ b/pgw/PGW_Tests.ttcn @@ -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,