[asterisk-dev] [Code Review]: Add test for correct HANGUPCAUSE after SIP 404

wdoekes reviewboard at asterisk.org
Fri Jun 1 01:58:19 CDT 2012



> On May 31, 2012, 2:41 p.m., Paul Belanger wrote:
> >

Thanks for the review.


> On May 31, 2012, 2:41 p.m., Paul Belanger wrote:
> > /asterisk/trunk/tests/channels/SIP/sip2cause/configs/ast1/extensions.conf, lines 3-5
> > <https://reviewboard.asterisk.org/r/1951/diff/3/?file=28415#file28415line3>
> >
> >     exten => 1234,1,NoOp()
> >         same => n,Answer()
> >         same => n,Echo()

Ok, letting compatibility with 1.6.2 go. Replaced.


> On May 31, 2012, 2:41 p.m., Paul Belanger wrote:
> > /asterisk/trunk/tests/channels/SIP/sip2cause/configs/ast1/sip.conf, line 2
> > <https://reviewboard.asterisk.org/r/1951/diff/3/?file=28416#file28416line2>
> >
> >     127.0.0.1:5060

Ok, letting compatibility with 1.6.2 go. Replaced.


> On May 31, 2012, 2:41 p.m., Paul Belanger wrote:
> > /asterisk/trunk/tests/channels/SIP/sip2cause/test-config.yaml, line 8
> > <https://reviewboard.asterisk.org/r/1951/diff/3/?file=28419#file28419line8>
> >
> >     bump to 1.8, since 1.6.2 is not supported any more

Ok, letting compatibility with 1.6.2 go. Replaced.


> On May 31, 2012, 2:41 p.m., Paul Belanger wrote:
> > /asterisk/trunk/tests/channels/SIP/sip2cause/test-config.yaml, line 10
> > <https://reviewboard.asterisk.org/r/1951/diff/3/?file=28419#file28419line10>
> >
> >     Assumed because starpy is here

Removed.


> On May 31, 2012, 2:41 p.m., Paul Belanger wrote:
> > /asterisk/trunk/tests/channels/SIP/sip2cause/run-test, line 37
> > <https://reviewboard.asterisk.org/r/1951/diff/3/?file=28417#file28417line37>
> >
> >     can be removed, TestCase logs an INFO message

Removed.


> On May 31, 2012, 2:41 p.m., Paul Belanger wrote:
> > /asterisk/trunk/tests/channels/SIP/sip2cause/run-test, line 28
> > <https://reviewboard.asterisk.org/r/1951/diff/3/?file=28417#file28417line28>
> >
> >     remove, TestCase sets by default

Removed.


> On May 31, 2012, 2:41 p.m., Paul Belanger wrote:
> > /asterisk/trunk/tests/channels/SIP/sip2cause/configs/ast1/extensions.conf, line 8
> > <https://reviewboard.asterisk.org/r/1951/diff/3/?file=28415#file28415line8>
> >
> >     not a fan of using _X! for tests, especially since we consider it a bad practice.

Hm.. I kind of like _X! -- at least it makes more sense than the _X. we see everywhere -- but since it is mentioned in the bestpractices file, I'll abide.


- wdoekes


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


On May 31, 2012, 2:32 p.m., wdoekes wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1951/
> -----------------------------------------------------------
> 
> (Updated May 31, 2012, 2:32 p.m.)
> 
> 
> Review request for Asterisk Developers and opticron.
> 
> 
> Summary
> -------
> 
> See ASTERISK-19914 and preceding discussion in http://lists.digium.com/pipermail/asterisk-dev/2012-May/055309.html
> 
> Apparently r351130 broke correct HANGUPCAUSE setting in certain cases. This only tests the 404 case. Feel free to expand it later if needed.
> 
> 
> P.S. There are now 3 test cases that concern hangupcauses. That might cause confusion:
>   hangupcause => tests ${HASH*(HANGUPCAUSE,*)}
>   sip_cause => tests ${HASH*(SIP_CAUSE,*)}
>   sip2cause => tests _getting_ ${HANGUPCAUSE} (and implicit propagation)
> 
> 
> This addresses bug ASTERISK-19914.
>     https://issues.asterisk.org/jira/browse/ASTERISK-19914
> 
> 
> Diffs
> -----
> 
>   /asterisk/trunk/tests/channels/SIP/sip2cause/configs/ast1/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/channels/SIP/sip2cause/configs/ast1/sip.conf PRE-CREATION 
>   /asterisk/trunk/tests/channels/SIP/sip2cause/run-test PRE-CREATION 
>   /asterisk/trunk/tests/channels/SIP/sip2cause/sipp/invite_recv_do_404.xml PRE-CREATION 
>   /asterisk/trunk/tests/channels/SIP/sip2cause/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/channels/SIP/tests.yaml 3243 
> 
> Diff: https://reviewboard.asterisk.org/r/1951/diff
> 
> 
> Testing
> -------
> 
> Before chan_sip.diff from ASTERISK-19914 on 1.8.x.
> 
> <?xml version="1.0" encoding="utf-8"?>
> <testsuite errors="0" failures="1" name="AsteriskTestSuite" tests="1" time="7.43">
>   <testcase name="tests/channels/SIP/sip2cause" time="7.43">
>     <failure>
>       Running ['tests/channels/SIP/sip2cause/run-test'] ...
> [May 29 08:31:35] ERROR[14215]: __main__:69 on_hangup: Unexpected HANGUPCAUSE 34 (not 1) for channel SIP/alice-00000000
> [May 29 08:31:40] ERROR[14215]: __main__:69 on_hangup: Unexpected HANGUPCAUSE 0 (not 1) for channel Local/1111 at dial-alice-1c03;1
> [May 29 08:31:40] ERROR[14215]: __main__:69 on_hangup: Unexpected HANGUPCAUSE 34 (not 1) for channel Local/1111 at dial-alice-1c03;2
> 
>     </failure>
>   </testcase>
> </testsuite>
> 
> 
> After chan_sip.diff on 1.8.x (and on 1.6.2.x):
> 
> <?xml version="1.0" encoding="utf-8"?>
> <testsuite errors="0" failures="0" name="AsteriskTestSuite" tests="1" time="12.54">
>   <testcase name="tests/channels/SIP/sip2cause" time="12.54"/>
> </testsuite>
> 
> 
> Thanks,
> 
> wdoekes
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120601/7f59124f/attachment-0001.htm>


More information about the asterisk-dev mailing list