<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://reviewboard.asterisk.org/r/2498/">https://reviewboard.asterisk.org/r/2498/</a>
</td>
</tr>
</table>
<br />
<p>Ship it!</p>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Ship It!</pre>
<br />
<p>- Matt</p>
<br />
<p>On May 17th, 2013, 8:07 p.m. UTC, jbigelow wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://reviewboard.asterisk.org/static/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Asterisk Developers and Matt Jordan.</div>
<div>By jbigelow.</div>
<p style="color: grey;"><i>Updated May 17, 2013, 8:07 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="https://issues.asterisk.org/jira/browse/ASTERISK-21422">ASTERISK-21422</a>
</div>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
testsuite
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This uses AMI to allow verification of CEL messages. It is based on the AMIOrderedHEaderMatchInstance but differs in that it's specifically for checking CEL messages and that a partial order may be specified to allow messages to be out of order.
A condition match item of "Event: CEL" is always used and can not be overridden however additional condition match items may be specified. The list of requirements are checked in the order listed unless the optional 'partialorder' is specified.
Best explained by the description in the sample yaml file:
* If the event does successfully meet the 'match' critera of the
requirement expected and...
* a 'partialorder' is not specified, then this requirement
passes. Therefore the second requirement in the
requirements list is then expected.
* a 'partialorder' is specified and...
* the criteria is also met, then the requirement
passes. Therefore the second requirement in the
requirements list is then expected.
* the criteria is not met, the test is failed.
* If it does not meet the 'match' criteria of the requirement
expected and...
* a partial order is not specified, the test is failed.
* a partial order is specified, it will remember the
requirement it is on and check if the 'match' criteria of
the next requirement in the list is met. It will continue
with each requirement in the order listed (where all the
criteria hasn't previously been met) until the 'match'
criteria is met or the end of the requirements list has
been reached at which point the test is failed.
* If the 'match' critera is successfully met and a...
* partial order is not specified, the test is
failed as the event arrived to early.
* partial order is specified and it's criteria
is not met, the test is failed.
* partial order is specified and it's criteria
is met, it is considered a successful match. It will
then move on and expect the next requirement in the
list from the point of the remembered requirement.
Note: If the 'match' criteria is met but not the 'partialorder' criteria of a requirement, the test is failed instead of checking other listed requirements. I did not run into a scenario where this prevented a test from properly failing or passing during my testing. It appears it would be very uncommon to run into this. </pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">* Tested by creating a simple test that used the SimpleTestCase test object to create a local channel and execute some dialplan. This created an environment where the CEL events would not always be in the same order upon each execution. Specifying a partial order on some of the requirements allowed to successfully work around the CEL events not being in the same order thus allowing the test to pass. Used it to also ensure expected failures did in fact cause the test to fail.
* Tested by modifying the bridge/bindxfer_nominal/ test (which actually performs a blind transfer) to use this and again was able to use the partialorder on some of the requirements to work around the CEL events not always being in the same order.
* Also tested doing the same with the bridge/blindxfer_setup/ test
* Tested to ensure that only those EventName's listed in the requirements are checked and those not are ignored.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>/asterisk/trunk/configs/cel.conf <span style="color: grey">(3777)</span></li>
<li>/asterisk/trunk/lib/python/asterisk/ami.py <span style="color: grey">(3777)</span></li>
<li>/asterisk/trunk/sample-yaml/ami-config.yaml.sample <span style="color: grey">(3777)</span></li>
</ul>
<p><a href="https://reviewboard.asterisk.org/r/2498/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>