[asterisk-dev] [Code Review] New version of sip_outbound_address test
wdoekes
reviewboard at asterisk.org
Wed Sep 26 02:12:03 CDT 2012
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2131/#review7157
-----------------------------------------------------------
Only a couple of minor python nitpicks.
Thanks for cleaning up the test!
/asterisk/trunk/tests/channels/SIP/sip_outbound_address/originator.py
<https://reviewboard.asterisk.org/r/2131/#comment13814>
I don't see anyone checking ami for None later on?
/asterisk/trunk/tests/channels/SIP/sip_outbound_address/originator.py
<https://reviewboard.asterisk.org/r/2131/#comment13811>
Don't return at the end of the method unless you have something to return.
/asterisk/trunk/tests/channels/SIP/sip_outbound_address/originator.py
<https://reviewboard.asterisk.org/r/2131/#comment13813>
As above.
/asterisk/trunk/tests/channels/SIP/sip_outbound_address/originator.py
<https://reviewboard.asterisk.org/r/2131/#comment13812>
I prefer this; pep8 valid and still only 4 lines:
dest = DESTINATIONS[self.current_destination]
deferred = self.ami.originate(channel='Local/%s at default' % dest,
application='Echo')
deferred.addCallback(self.success).addErrback(failure)
(and moving the dest assignment up will clean up the LOGGER.info too)
- wdoekes
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/20120926/0f70f628/attachment-0001.htm>
More information about the asterisk-dev
mailing list