pgw: Expect EchoResp in CLIENT port of component who sent EchoReq
A recent commit in GTPv2_Emulation improved the routing of incoming
messages from network towards clients.
After that change, the GTPv2_Emulation properly matches the originating
component of the procedure and forwards the reply to it.
Hence, TC_tx_echo() needs to be adapter to expect the reply on its
CLIENT port.
TEID0 is now left for incoming initiating messages which have no seqnr
match.
Change-Id: I1764fdf81192597e393d79d34cb8f221aa79bbd9
Fixes: 1d2cc67036e95a0c3ee3ac7738d7e15d5f76b8a2
diff --git a/pgw/PGW_Tests.ttcn b/pgw/PGW_Tests.ttcn
index b8eb471..fa7be47 100644
--- a/pgw/PGW_Tests.ttcn
+++ b/pgw/PGW_Tests.ttcn
@@ -41,7 +41,7 @@
}
/* main component, we typically have one per testcase */
-type component PGW_Test_CT {
+type component PGW_Test_CT extends GTP2_ConnHdlr {
var GTPv2_Emulation_CT vc_GTP2;
port GTP2EM_PT TEID0;
@@ -241,6 +241,8 @@
vc_GTP2 := GTPv2_Emulation_CT.create("GTP2_EM");
map(vc_GTP2:GTP2C, system:GTP2C);
connect(vc_GTP2:TEID0, self:TEID0);
+ connect(vc_GTP2:CLIENT, self:GTP2);
+ connect(vc_GTP2:CLIENT_PROC, self:GTP2_PROC);
vc_GTP2.start(GTPv2_Emulation.main(cfg));
if (mp_pcrf_local_ip != "") {
@@ -785,10 +787,10 @@
f_init();
- TEID0.send(ts_GTP2C_EchoReq(0));
+ GTP2.send(ts_GTP2C_EchoReq(0));
T.start;
alt {
- [] TEID0.receive(tr_GTP2C_EchoResp) {
+ [] GTP2.receive(tr_GTP2C_EchoResp) {
setverdict(pass);
}
[] T.timeout {