aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2022-04-07 19:05:15 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2022-04-07 19:05:15 +0200
commit08880f11e95aee90cb87fa499986d871a486beb9 (patch)
treef66214c2762d7c7ea4502bf6fb929230aafaf4ba
parenta47a8c60eee3c224ea680207c0ef2eb6e718f7cf (diff)
pgw: Add T_guard
-rw-r--r--pgw/PGW_Tests.ttcn15
1 files changed, 14 insertions, 1 deletions
diff --git a/pgw/PGW_Tests.ttcn b/pgw/PGW_Tests.ttcn
index d9f49798..a65ca435 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,