aboutsummaryrefslogtreecommitdiffstats
path: root/library/SIP_Emulation.ttcn
diff options
context:
space:
mode:
authorDaniel Willmann <dwillmann@sysmocom.de>2018-07-05 17:35:03 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2018-07-24 09:54:18 +0000
commite4ff537f9baacc94242407041f30de1994316622 (patch)
tree962ab05f96641d2983012df8ac80b03098cc81e4 /library/SIP_Emulation.ttcn
parentfcf27c9f24a2a9e636c5d9006f732b9bcbf0cea8 (diff)
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
Diffstat (limited to 'library/SIP_Emulation.ttcn')
-rw-r--r--library/SIP_Emulation.ttcn17
1 files changed, 9 insertions, 8 deletions
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 */