[asterisk-dev] [Code Review]: New version of sip_outbound_address test

Mark Michelson reviewboard at asterisk.org
Thu Oct 4 17:49:46 CDT 2012



> On Sept. 26, 2012, 2:12 a.m., wdoekes wrote:
> > Only a couple of minor python nitpicks.
> > 
> > Thanks for cleaning up the test!

And thanks for your review. Aside from where I've commented below, my new diff will address all your comments.


> On Sept. 26, 2012, 2:12 a.m., wdoekes wrote:
> > /asterisk/trunk/tests/channels/SIP/sip_outbound_address/originator.py, line 28
> > <https://reviewboard.asterisk.org/r/2131/diff/3/?file=31441#file31441line28>
> >
> >     I don't see anyone checking ami for None later on?

Given the way the test runs, it shouldn't be possible for this to happen. I'd rather an exception be thrown and things crash and burn horribly if self.ami is None when unexpected.


- Mark


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2131/#review7157
-----------------------------------------------------------


On Sept. 25, 2012, 1:31 p.m., Mark Michelson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2131/
> -----------------------------------------------------------
> 
> (Updated Sept. 25, 2012, 1:31 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> This is a rewrite of the sip_outbound_address test. This test had a "skip" flag set on it in apparently because the test was bouncing. Unfortunately, not having this test enabled resulted in the issue ASTERISK-19677.
> 
> The test was likely bouncing due to some odd timing being used (combination of Wait() dialplan app plus some sleep() calls in the test code). I've rewritten the test to no longer use Lua and instead use Python. It uses the SIPpTestCase. This test becomes either the second or third to have an "originator" module used alongside the SIPpTestCase. Perhaps it's time to consider making this a module central to the test suite?
> 
> As far as the test details are concerned, the test mostly is the same. The same extensions.conf is used and the same destinations are dialed. Now, instead of having the SIPp scenario that answers send back DTMF, the SIPp scenario simply answers and then hangs up. The test can be determined to pass or fail based on whether the SIPp scenario succeeds or fails. It will fail if Asterisk were to route the request to the wrong destination. This has made the test much simpler than it previously was.
> 
> 
> Diffs
> -----
> 
>   /asterisk/trunk/tests/channels/SIP/sip_outbound_address/configs/ast1/extensions.conf 3480 
>   /asterisk/trunk/tests/channels/SIP/sip_outbound_address/configs/ast1/sip.conf 3480 
>   /asterisk/trunk/tests/channels/SIP/sip_outbound_address/originator.py PRE-CREATION 
>   /asterisk/trunk/tests/channels/SIP/sip_outbound_address/run-test 3480 
>   /asterisk/trunk/tests/channels/SIP/sip_outbound_address/sipp/dtmf_2833_1.pcap UNKNOWN 
>   /asterisk/trunk/tests/channels/SIP/sip_outbound_address/sipp/dtmf_2833_2.pcap UNKNOWN 
>   /asterisk/trunk/tests/channels/SIP/sip_outbound_address/sipp/dtmf_2833_pound.pcap UNKNOWN 
>   /asterisk/trunk/tests/channels/SIP/sip_outbound_address/sipp/uas.xml PRE-CREATION 
>   /asterisk/trunk/tests/channels/SIP/sip_outbound_address/sipp/uas1.xml 3480 
>   /asterisk/trunk/tests/channels/SIP/sip_outbound_address/sipp/uas2.xml 3480 
>   /asterisk/trunk/tests/channels/SIP/sip_outbound_address/test-config.yaml 3480 
>   /asterisk/trunk/tests/channels/SIP/sip_outbound_address/test.lua 3480 
> 
> Diff: https://reviewboard.asterisk.org/r/2131/diff
> 
> 
> Testing
> -------
> 
> Test passes with current 1.8 version of Asterisk.
> 
> 
> Thanks,
> 
> Mark
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20121004/9add07ef/attachment.htm>


More information about the asterisk-dev mailing list