pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27661 )


Change subject: pgw: Add T_guard
......................................................................

pgw: Add T_guard

Change-Id: I9dce4aee4a0b1181bb7dc1a53fb254e6d17cf22e
---
M pgw/PGW_Tests.ttcn
1 file changed, 14 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/61/27661/1

diff --git a/pgw/PGW_Tests.ttcn b/pgw/PGW_Tests.ttcn
index d9f4979..a65ca43 100644
--- a/pgw/PGW_Tests.ttcn
+++ b/pgw/PGW_Tests.ttcn
@@ -40,6 +40,16 @@
        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 @@
        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,

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27661
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I9dce4aee4a0b1181bb7dc1a53fb254e6d17cf22e
Gerrit-Change-Number: 27661
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>
Gerrit-MessageType: newchange

Reply via email to