[asterisk-dev] [Code Review]: Update Asterisk Test Suite pre-/post-condition check framework to support asynchronous process management

Matt Jordan reviewboard at asterisk.org
Tue Apr 17 18:01:02 CDT 2012



> On April 16, 2012, 3:38 p.m., opticron wrote:
> > /asterisk/trunk/lib/python/asterisk/ChannelTestCondition.py, line 36
> > <https://reviewboard.asterisk.org/r/1831/diff/2/?file=26916#file26916line36>
> >
> >     This probably needs to be set as a callback on the cli_exec so it actually gets called.

Fixed


> On April 16, 2012, 3:38 p.m., opticron wrote:
> > /asterisk/trunk/lib/python/asterisk/SipDialogTestCondition.py, line 127
> > <https://reviewboard.asterisk.org/r/1831/diff/2/?file=26919#file26919line127>
> >
> >     I may be missing something (a sequentiality requirement?), but I don't see why recursion is required here and below vs. putting a deferred callback on the cli_exec.  It looks like it works fine, so feel free to ignore this comment.

Except that when I looked at it, I had to sit there and think about what it was doing as well.  Putting the callback directly on the deferred returned from cli_exec is much cleaner.


- Matt


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


On March 28, 2012, 9 a.m., Matt Jordan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1831/
> -----------------------------------------------------------
> 
> (Updated March 28, 2012, 9 a.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> This is a continuation of review https://reviewboard.asterisk.org/r/1821/.
> 
> The pre-/post-condition checking framework in the Asterisk Test Suite was not migrated over to handle the now asynchronous nature of the asterisk class.  As such, it failed to function properly.  Since this is not a heavily used feature, I waited until this review to migrate it over to handle twisted until this review.
> 
> This patch makes the framework and the various concrete implementations of TestCondition work in an asynchronous fashion.
> 
> 
> Diffs
> -----
> 
>   /asterisk/trunk/lib/python/asterisk/asterisk.py 3157 
>   /asterisk/trunk/lib/python/asterisk/ThreadTestCondition.py 3157 
>   /asterisk/trunk/lib/python/asterisk/TestConditions.py 3157 
>   /asterisk/trunk/lib/python/asterisk/TestCase.py 3157 
>   /asterisk/trunk/lib/python/asterisk/SipDialogTestCondition.py 3157 
>   /asterisk/trunk/lib/python/asterisk/LockTestCondition.py 3157 
>   /asterisk/trunk/lib/python/asterisk/FdTestCondition.py 3157 
>   /asterisk/trunk/lib/python/asterisk/ChannelTestCondition.py 3157 
> 
> Diff: https://reviewboard.asterisk.org/r/1831/diff
> 
> 
> Testing
> -------
> 
> Tested each of the TestCondition derived objects on a variety of tests.  Test failures were reported as expected (for example, a test that had additional threads existing in Asterisk at the time of shutdown was reported as having those threads existing).  Tested file descriptors, locks, channels, SIP dialogs, and threads.
> 
> 
> Thanks,
> 
> Matt
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120417/386f1ede/attachment.htm>


More information about the asterisk-dev mailing list