dexter has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43820?usp=email )

Change subject: eIM_Tests: remove code dup in f_esipa_transceive
......................................................................

eIM_Tests: remove code dup in f_esipa_transceive

In f_esipa_transceive we check if the response returned from
f_esipa_receive is the one we expect. But we can also pass the
expected response template to f_esipa_receive and let
f_esipa_receive perform the check.

Change-Id: I11f0b7bcf1bf8c763e6915eda34c3ede2a9a5c94
Related: SYS#8203
---
M eim/eIM_Tests.ttcn
1 file changed, 1 insertion(+), 8 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved
  jolly: Looks good to me, but someone else must approve




diff --git a/eim/eIM_Tests.ttcn b/eim/eIM_Tests.ttcn
index 7888885..8675c99 100644
--- a/eim/eIM_Tests.ttcn
+++ b/eim/eIM_Tests.ttcn
@@ -478,15 +478,8 @@
 private function f_esipa_transceive(EsipaMessageFromIpaToEim esipa_req,
                                    template EsipaMessageFromEimToIpa 
expected_esipa_res := omit)
 runs on eIM_ConnHdlr return template EsipaMessageFromEimToIpa {
-       var template EsipaMessageFromEimToIpa esipa_res
        f_esipa_send(esipa_req);
-       esipa_res := f_esipa_receive();
-       if (not istemplatekind(expected_esipa_res, "omit")) {
-               if (not match(valueof(esipa_res), expected_esipa_res)) {
-                       setverdict(fail, "unexpected response from eIM on 
ESipa");
-               }
-       }
-       return esipa_res;
+       return f_esipa_receive(expected_esipa_res);
 }



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

Gerrit-MessageType: merged
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I11f0b7bcf1bf8c763e6915eda34c3ede2a9a5c94
Gerrit-Change-Number: 43820
Gerrit-PatchSet: 5
Gerrit-Owner: dexter <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <[email protected]>
Gerrit-Reviewer: jolly <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>

Reply via email to