[asterisk-dev] [Code Review] 4051: testsuite: chan_sip: Test dialog leak reported in ASTERISK-20784.

wdoekes reviewboard at asterisk.org
Thu Oct 9 08:57:53 CDT 2014



> On Oct. 9, 2014, 12:12 p.m., Matt Jordan wrote:
> > /asterisk/trunk/tests/channels/SIP/no_ack_dialog_cleanup/run-test, line 42
> > <https://reviewboard.asterisk.org/r/4051/diff/2/?file=67875#file67875line42>
> >
> >     nitpick: As this is a global, it should be LOGGER, not logger.
> >     
> >     (Yes, I'm sure this is wrong in lots of places still in the testsuite :-)

Hm. That's not a python convention.

Uppercase is only used for constants. (A logger object is not one.)

But I can certainly live with the convention here.


> On Oct. 9, 2014, 12:12 p.m., Matt Jordan wrote:
> > /asterisk/trunk/tests/channels/SIP/no_ack_dialog_cleanup/run-test, line 63
> > <https://reviewboard.asterisk.org/r/4051/diff/2/?file=67875#file67875line63>
> >
> >     Given that you have a 14 second delay to let the scenarios finish up, you may want to just use the default reactor_timeout.
> >     
> >     We have one build agent in particular that is sloooowwww. It's great, because it catches all kinds of interesting race conditions in Asterisk, but it's murderous on timing dependent tests - I'd give yourself a bit of an extra buffer here.

Yes. It turned out I needed a little extra indeed.

I moved the code around to start testing for the dialogs to go away immediately, and it turned out they were gone first at t=13.3.

Now the test completes as soon as possible, but failure will take a bit longer to detect.


- wdoekes


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


On Oct. 9, 2014, 1:49 p.m., wdoekes wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/4051/
> -----------------------------------------------------------
> 
> (Updated Oct. 9, 2014, 1:49 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: ASTERISK-20784
>     https://issues.asterisk.org/jira/browse/ASTERISK-20784
> 
> 
> Repository: testsuite
> 
> 
> Description
> -------
> 
> Old bug from end of 2012: under the right circumstances, a leg never gets
> destroyed, resulting in file leaks and other nastiness.
> 
> This tests that scenario and the fix as presented in patch_asterisk_20784.txt.
> 
> 
> Diffs
> -----
> 
>   /asterisk/trunk/tests/channels/SIP/tests.yaml 5684 
>   /asterisk/trunk/tests/channels/SIP/no_ack_dialog_cleanup/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/channels/SIP/no_ack_dialog_cleanup/sipp/bob.xml PRE-CREATION 
>   /asterisk/trunk/tests/channels/SIP/no_ack_dialog_cleanup/sipp/alice.xml PRE-CREATION 
>   /asterisk/trunk/tests/channels/SIP/no_ack_dialog_cleanup/run-test PRE-CREATION 
>   /asterisk/trunk/tests/channels/SIP/no_ack_dialog_cleanup/configs/ast1/sip.conf PRE-CREATION 
>   /asterisk/trunk/tests/channels/SIP/no_ack_dialog_cleanup/configs/ast1/extensions.conf PRE-CREATION 
> 
> Diff: https://reviewboard.asterisk.org/r/4051/diff/
> 
> 
> Testing
> -------
> 
> Before applying patch_asterisk_20784.txt:
> 
> 
> <?xml version="1.0" encoding="utf-8"?>
> <testsuite errors="0" failures="1" name="AsteriskTestSuite" tests="1" time="16.05">
>   <testcase name="tests/channels/SIP/no_ack_dialog_cleanup" time="16.05">
>     <failure>Running ['tests/channels/SIP/no_ack_dialog_cleanup/run-test'] ...
> [Oct 08 12:26:54] WARNING[10545]: __main__:104 ret: Expected 0 sip dialog objects:
>   name: 42da441f7021d3ff2b1c194b124395f8 at 127.0.0.1:5060
>   type: dialog
>   objflags: 0
>   refcount: 1
> </failure>
>   </testcase>
> </testsuite>
> 
> 
> After applying:
> 
> 
> <?xml version="1.0" encoding="utf-8"?>
> <testsuite errors="0" failures="0" name="AsteriskTestSuite" tests="1" time="16.06">
>   <testcase name="tests/channels/SIP/no_ack_dialog_cleanup" time="16.06"/>
> </testsuite>
> 
> 
> Thanks,
> 
> wdoekes
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20141009/5debd3aa/attachment-0001.html>


More information about the asterisk-dev mailing list