<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/2661/">https://reviewboard.asterisk.org/r/2661/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On August 9th, 2013, 8:12 p.m. UTC, <b>David Lee</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="https://reviewboard.asterisk.org/r/2661/diff/2/?file=43765#file43765line23" style="color: black; font-weight: bold; text-decoration: underline;">/asterisk/trunk/tests/rest_api/continue/test-config.yaml</a>
<span style="font-weight: normal;">
(Diff revision 2)
</span>
</th>
</tr>
</thead>
<tbody>
<tr>
<th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">22</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="l-Scalar-Plain">ari-config</span><span class="p-Indicator">:</span></pre></td>
<th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">19</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="l-Scalar-Plain">ari-config</span><span class="p-Indicator">:</span></pre></td>
</tr>
<tr>
<th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">23</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="l-Scalar-Plain">apps</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">continue-test</span></pre></td>
<th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">20</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="l-Scalar-Plain">apps</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">continue-test</span></pre></td>
</tr>
<tr>
<th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">24</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="l-Scalar-Plain">events</span><span class="p-Indicator">:</span></pre></td>
<th bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">21</font></th>
<td bgcolor="#ffffff" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="l-Scalar-Plain">events</span><span class="p-Indicator">:</span></pre></td>
</tr>
</tbody>
</table>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">So this specifies that the test should use the app 'continue-test' to connect to the WebSocket, but everything else is using the app 'testsuite'.
I'm thinking that the apps ari-config isn't working, and it's just going with the default.</pre>
</blockquote>
<p>On August 9th, 2013, 9:22 p.m. UTC, <b>Matt Jordan</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">It appears that way.
Currently, the test_object is attempting to read that out, which is incorrect. The test object isn't what verifies the events coming back from the websocket.</pre>
</blockquote>
<p>On August 19th, 2013, 4:17 p.m. UTC, <b>Mark Michelson</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Shouldn't "apps: continue-test" be in the test-object-config section either instead of or in addition to the ari-config section?</pre>
</blockquote>
</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">It should if it was going to use an application other than 'testsuite', which is the default.</pre>
<br />
<p>- Matt</p>
<br />
<p>On August 3rd, 2013, 2:49 p.m. UTC, Matt Jordan 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 David Lee.</div>
<div>By Matt Jordan.</div>
<p style="color: grey;"><i>Updated Aug. 3, 2013, 2:49 p.m.</i></p>
<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;">Testing ARI is a bit different than testing normal Asterisk tests. Typically, a test in the Asterisk Test Suite uses the following model:
1. Create Asterisk Instances
2. Wait for instances to fully boot
3. Connect AMI
4. Wait for AMI connection
5. Spawn channels for test
Most of the test logic occurs in step number 5 - while it's possible to inject logic into the first four steps without writing a new test object, it isn't easy, particularly if what you need to do is defer the execution of one of those four steps until something else happens. In particular, ARI tests need to connect the websocket prior to step 4, as the AMI connection is what typically causes channels to be created in the dialplan and test execution to begin. If the websocket connection doesn't happen before that point, a channel may enter into the Stasis application before the websocket connects and the test will fail.
This patch gives ARI its own test object so that it can properly connect the websocket prior to the AMI connection. This changes the startup routine to be:
1. Create Asterisk Instances
2. Wait for instances to fully boot
3. Connect ARI
4. Wait for ARI connection
5. Connection AMI
6. Wait for AMI connection
7. Spawn channels for test
It also duplicates what we currently do for starpy for Autobahn's websocket library as well, which is what the ARI test library uses for connecting to Asterisk.</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/sample-yaml/ari-config.yaml.sample <span style="color: grey">(3975)</span></li>
<li>/asterisk/trunk/lib/python/asterisk/ari.py <span style="color: grey">(3975)</span></li>
<li>/asterisk/trunk/addons/Makefile <span style="color: grey">(3975)</span></li>
<li>/asterisk/trunk/tests/rest_api/continue/configs/ast1/ari.conf <span style="color: grey">(PRE-CREATION)</span></li>
<li>/asterisk/trunk/tests/rest_api/continue/configs/ast1/extensions.conf <span style="color: grey">(3975)</span></li>
<li>/asterisk/trunk/tests/rest_api/continue/rest_continue.py <span style="color: grey">(3975)</span></li>
<li>/asterisk/trunk/tests/rest_api/continue/test-config.yaml <span style="color: grey">(3975)</span></li>
</ul>
<p><a href="https://reviewboard.asterisk.org/r/2661/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>