From e4ff537f9baacc94242407041f30de1994316622 Mon Sep 17 00:00:00 2001 From: Daniel Willmann Date: Thu, 5 Jul 2018 17:35:03 +0200 Subject: library: Ensure setverdict(fail) is followed by mtc.stop This will prevent subsequent failures from overwriting the verdict so we can easily see the root cause of the test failure. Using testcase.stop instead for errors internal to our test infrastructure to mark them as test errors instead of failed. Change-Id: Idc6819aaf0b01e70c38fad828dd44dcec6bdd778 --- library/SIP_Emulation.ttcn | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'library/SIP_Emulation.ttcn') diff --git a/library/SIP_Emulation.ttcn b/library/SIP_Emulation.ttcn index 3957b8f1..98f73710 100644 --- a/library/SIP_Emulation.ttcn +++ b/library/SIP_Emulation.ttcn @@ -155,7 +155,7 @@ runs on SIP_Emulation_CT return SIP_ConnHdlr { } } setverdict(fail, "SIP Call table not found by SIP Call ID ", call_id); - self.stop; + mtc.stop; } /* resolve connection ID by component reference */ @@ -167,7 +167,7 @@ runs on SIP_Emulation_CT return CallidString { } } setverdict(fail, "SIP Call table not found by component ", client); - self.stop; + mtc.stop; } private function f_expect_table_init() @@ -196,8 +196,7 @@ runs on SIP_Emulation_CT { return; } } - setverdict(fail, "SIP Call table full"); - self.stop; + testcase.stop("SIP Call table full"); } private function f_call_table_del(CallidString call_id) @@ -211,7 +210,7 @@ runs on SIP_Emulation_CT { } } setverdict(fail, "SIP Call table attempt to delete non-existant ", call_id); - self.stop; + mtc.stop; } /* call-back type, to be provided by specific implementation; called when new call connection @@ -270,7 +269,7 @@ runs on SIP_Emulation_CT { CLIENT.send(sip_req) to vc_conn; } else { setverdict(fail, "SIP Request for unknown call ", call_id); - self.stop; + mtc.stop; } } /* SIP response was received on SIP socket/port */ @@ -281,7 +280,7 @@ runs on SIP_Emulation_CT { CLIENT.send(sip_resp) to vc_conn; } else { setverdict(fail, "SIP Response for unknown call ", call_id); - self.stop; + mtc.stop; } } @@ -344,6 +343,7 @@ runs on SIP_Emulation_CT return SIP_ConnHdlr { if (sip_req.requestLine.method != INVITE_E) { setverdict(fail, "SIP ExpectedCreateCallback needs INVITE"); + mtc.stop return ret; } sip_to := sip_req.msgHeader.toField.addressField.nameAddr.addrSpec; @@ -378,6 +378,7 @@ runs on SIP_Emulation_CT return SIP_ConnHdlr { } setverdict(fail, "Couldn't find SipExpect for incoming call ", sip_to); + mtc.stop return ret; } @@ -393,7 +394,7 @@ runs on SIP_Emulation_CT { return; } } - setverdict(fail, "No space left in SipExpectTable"); + testcase.stop("No space left in SipExpectTable"); } /* client/conn_hdlr side function to use procedure port to create expect in emulation */ -- cgit v1.2.3