<p>Kevin Harwell has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/10603">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">sipp.py - fail the test case if a scenario files<br><br>The result passed to _handle_scenario_finished would always report success<br>(unless maybe an exception was thrown or something). This would set the test<br>case itself to passed even if a scenario failed. The SIPpSequence or Scenario<br>objects would do post checks so the test still failed appropriately. However,<br>in the log files you'd see messages that the scenario passed and then a bit<br>later that it failed. Moreso this could cause timing issues if for some reason<br>you wanted to force a sigabrt in Asterisk on test failure. For instance the<br>test would initially be marked as passed and start shutting down properly<br>instead of a forced stop.<br><br>This patch makes it so when a scenario finishes it checks the scenario's result<br>and uses that to set the initial test case result.<br><br>Change-Id: I1cf055cb3125bd5d8f1ad8b353961a4e6577b24d<br>---<br>M lib/python/asterisk/sipp.py<br>1 file changed, 1 insertion(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/03/10603/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/lib/python/asterisk/sipp.py b/lib/python/asterisk/sipp.py</span><br><span>index 0a28e05..200cac6 100644</span><br><span>--- a/lib/python/asterisk/sipp.py</span><br><span>+++ b/lib/python/asterisk/sipp.py</span><br><span>@@ -194,7 +194,7 @@</span><br><span> def _handle_scenario_finished(self, result):</span><br><span> """Handle whether or not a scenario finished successfully"""</span><br><span> for (success, scenario) in result:</span><br><span style="color: hsl(0, 100%, 40%);">- if (success):</span><br><span style="color: hsl(120, 100%, 40%);">+ if (success and scenario.passed):</span><br><span> LOGGER.info("Scenario %s passed" % (scenario.name))</span><br><span> self.set_passed(True)</span><br><span> else:</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/10603">change 10603</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/10603"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: testsuite </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I1cf055cb3125bd5d8f1ad8b353961a4e6577b24d </div>
<div style="display:none"> Gerrit-Change-Number: 10603 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Kevin Harwell <kharwell@digium.com> </div>