fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38031?usp=email )


Change subject: hnbgw: move vc_PFCP from ConnHdlr to test_CT
......................................................................

hnbgw: move vc_PFCP from ConnHdlr to test_CT

Change-Id: Iaf7a54c674f2dc549572d918beb6f355f48ee700
---
M hnbgw/HNBGW_Tests.ttcn
M library/PFCP_Emulation.ttcn
2 files changed, 9 insertions(+), 6 deletions(-)



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

diff --git a/hnbgw/HNBGW_Tests.ttcn b/hnbgw/HNBGW_Tests.ttcn
index 3765411..5204f38 100644
--- a/hnbgw/HNBGW_Tests.ttcn
+++ b/hnbgw/HNBGW_Tests.ttcn
@@ -350,6 +350,7 @@
        var MGCP_Emulation_CT vc_MGCP;
        port TELNETasp_PT HNBGWVTY;
        var StatsD_Checker_CT vc_STATSD;
+       var PFCP_Emulation_CT vc_PFCP;
        /* global test case guard timer (actual timeout value is set in 
f_init()) */
        timer T_guard := 30.0;

@@ -397,7 +398,7 @@
        vc_MGCP.start(MGCP_Emulation.main(ops, pars, id));
 }

-function f_init_pfcp(charstring id) runs on ConnHdlr {
+function f_init_pfcp(charstring id) runs on test_CT {
        id := id & "-PFCP";

        var PFCP_Emulation_Cfg pfcp_cfg := {
@@ -409,8 +410,6 @@
        };

        vc_PFCP := PFCP_Emulation_CT.create(id) alive;
-       connect(self:PFCP, vc_PFCP:CLIENT);
-       connect(self:PFCP_PROC, vc_PFCP:CLIENT_PROC);
        vc_PFCP.start(PFCP_Emulation.main(pfcp_cfg));
 }

@@ -622,6 +621,11 @@

        connect(vc_conn:STATSD_PROC, vc_STATSD:STATSD_PROC);

+       if (isbound(vc_PFCP)) {
+               connect(vc_conn:PFCP, vc_PFCP:CLIENT);
+               connect(vc_conn:PFCP_PROC, vc_PFCP:CLIENT_PROC);
+       }
+
        return vc_conn;
 }

@@ -651,8 +655,6 @@
        /* make parameters available via component variable */
        g_pars := pars;

-       f_init_pfcp(testcasename());
-
        /* start guard timer and activate it as default */
        g_Tguard.start(t_guard);
        activate(as_Tguard_ConnHdlr());
@@ -2030,6 +2032,7 @@
        var ConnHdlr vc_conn;
        g_num_hnbs := 1;
        f_init();
+       f_init_pfcp(testcasename());
        f_sleep(1.0);

        vc_conn := 
f_start_handler_with_pars(refers(f_tc_ps_rab_assignment_with_pfcp), t_pars(7, 
ps_domain := true));
@@ -2093,6 +2096,7 @@
 testcase TC_ps_rab_assignment_without_pfcp() runs on test_CT {
        var ConnHdlr vc_conn;
        f_init();
+       f_init_pfcp(testcasename());
        f_sleep(1.0);

        vc_conn := 
f_start_handler_with_pars(refers(f_tc_ps_rab_assignment_without_pfcp), 
t_pars(7, ps_domain := true));
diff --git a/library/PFCP_Emulation.ttcn b/library/PFCP_Emulation.ttcn
index 2fb3a8a..9cd9a86 100644
--- a/library/PFCP_Emulation.ttcn
+++ b/library/PFCP_Emulation.ttcn
@@ -199,7 +199,6 @@
 type component PFCP_ConnHdlr {
        port PFCPEM_PT PFCP;
        port PFCPEM_PROC_PT PFCP_PROC;
-       var PFCP_Emulation_CT vc_PFCP;
 };

 function f_pfcp_register() runs on PFCP_ConnHdlr {

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

Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Iaf7a54c674f2dc549572d918beb6f355f48ee700
Gerrit-Change-Number: 38031
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <[email protected]>

Reply via email to