[asterisk-dev] [Code Review] Add some CDR tests

Terry Wilson twilson at digium.com
Thu Apr 29 12:46:55 CDT 2010



> On 2010-04-29 10:29:40, Russell Bryant wrote:
> > /asterisk/trunk/tests/cdr/cdr_userfield/run-test, line 20
> > <https://reviewboard.asterisk.org/r/620/diff/2/?file=9592#file9592line20>
> >
> >     Why here instead of within the test dir?

socket path name is maxed out at 108 characters. I bumped into it because src/digium/asterisk/branches/1.4/testsuite/tests/cdr/console_dial_answer/ast1/var/run/asterisk/asterisk.ctl is really long. :-)


> On 2010-04-29 10:29:40, Russell Bryant wrote:
> > /asterisk/trunk/tests/cdr/cdr_userfield/run-test, line 65
> > <https://reviewboard.asterisk.org/r/620/diff/2/?file=9592#file9592line65>
> >
> >     check for trailing whitespace

fixed.


> On 2010-04-29 10:29:40, Russell Bryant wrote:
> > /asterisk/trunk/tests/cdr/console_dial_sip_congestion/run-test, lines 79-86
> > <https://reviewboard.asterisk.org/r/620/diff/2/?file=9616#file9616line79>
> >
> >     I usually use a different main() approach, as suggested by guido:
> >     
> >     http://www.artima.com/weblogs/viewpost.jsp?thread=4829
> >     
> >     
> >     def main(args=None):
> >         if argv is None:
> >             argv = sys.argv
> >         ...
> >         return 0
> >     
> >     if __name__ == "__main__":
> >         sys.exit(main())
> >     
> >     
> >     That way it's easy to run things from a python console if you should decide to do so.

fixed.


- Terry


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


On 2010-04-29 11:21:09, Terry Wilson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/620/
> -----------------------------------------------------------
> 
> (Updated 2010-04-29 11:21:09)
> 
> 
> Review request for Asterisk Developers and Russell Bryant.
> 
> 
> Summary
> -------
> 
> Here are 9 CDR tests. Also added is a wrapper class for starpy's AMI that does exponential backoff reconnecting on a failed connect. The better thing to do with that would be to modify starpy itself to have AMIFactory inherit from ReconnectingClientFactory instead of ClientFactory.
> 
> 
> Diffs
> -----
> 
>   /asterisk/trunk/lib/python/asterisk/ami.py PRE-CREATION 
>   /asterisk/trunk/tests/cdr/cdr_unanswered_yes/configs/cdr.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/cdr_unanswered_yes/configs/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/cdr_unanswered_yes/configs/logger.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/cdr_unanswered_yes/configs/manager.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/cdr_unanswered_yes/run-test PRE-CREATION 
>   /asterisk/trunk/tests/cdr/cdr_unanswered_yes/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/cdr/cdr_userfield/configs/cdr.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/cdr_userfield/configs/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/cdr_userfield/configs/logger.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/cdr_userfield/configs/manager.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/cdr_userfield/run-test PRE-CREATION 
>   /asterisk/trunk/tests/cdr/cdr_userfield/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_dial_sip_answer/configs1/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_dial_sip_answer/configs1/manager.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_dial_sip_answer/configs1/sip.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_dial_sip_answer/configs2/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_dial_sip_answer/configs2/sip.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_dial_sip_answer/configs_common/logger.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_dial_sip_answer/run-test PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_dial_sip_answer/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_dial_sip_busy/configs1/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_dial_sip_busy/configs1/manager.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_dial_sip_busy/configs1/sip.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_dial_sip_busy/configs2/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_dial_sip_busy/configs2/sip.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_dial_sip_busy/configs_common/logger.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_dial_sip_busy/run-test PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_dial_sip_busy/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_dial_sip_congestion/configs1/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_dial_sip_congestion/configs1/manager.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_dial_sip_congestion/configs1/sip.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_dial_sip_congestion/configs2/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_dial_sip_congestion/configs2/sip.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_dial_sip_congestion/configs_common/logger.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_dial_sip_congestion/run-test PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_dial_sip_congestion/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_dial_sip_transfer/configs1/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_dial_sip_transfer/configs1/manager.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_dial_sip_transfer/configs1/sip.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_dial_sip_transfer/configs2/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_dial_sip_transfer/configs2/sip.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_dial_sip_transfer/configs_common/logger.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_dial_sip_transfer/run-test PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_dial_sip_transfer/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_fork_after_busy_forward/configs1/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_fork_after_busy_forward/configs1/manager.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_fork_after_busy_forward/configs1/sip.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_fork_after_busy_forward/configs2/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_fork_after_busy_forward/configs2/sip.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_fork_after_busy_forward/configs_common/logger.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_fork_after_busy_forward/run-test PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_fork_after_busy_forward/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_fork_before_dial/configs1/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_fork_before_dial/configs1/manager.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_fork_before_dial/configs1/sip.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_fork_before_dial/configs2/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_fork_before_dial/configs2/sip.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_fork_before_dial/configs_common/logger.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_fork_before_dial/run-test PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_fork_before_dial/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/cdr/nocdr/configs/cdr.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/nocdr/configs/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/nocdr/configs/logger.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/nocdr/configs/manager.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/nocdr/run-test PRE-CREATION 
>   /asterisk/trunk/tests/cdr/nocdr/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/tests.yaml 263 
> 
> Diff: https://reviewboard.asterisk.org/r/620/diff
> 
> 
> Testing
> -------
> 
> At one point I tested against all releases from 1.4 to 1.6.2 making sure I could make them both fail and pass. I reworked the tests to use twisted so I wouldn't have to do sleep() calls waiting for a call to end and instead just listen for manager events. I have tested on 1.4 and 1.6.2 for those changes.
> 
> 
> Thanks,
> 
> Terry
> 
>




More information about the asterisk-dev mailing list