[asterisk-dev] [Code Review]: Add test for 'e' option on ForkCDR

jrose reviewboard at asterisk.org
Thu Apr 12 16:29:49 CDT 2012



> On April 12, 2012, 8:21 a.m., Matt Jordan wrote:
> > /asterisk/trunk/tests/cdr/cdr_fork_end_time/run-test, line 56
> > <https://reviewboard.asterisk.org/r/1853/diff/1/?file=27038#file27038line56>
> >
> >     If, for whatever reason, duration was not written to the CSV CDR, this would throw an exception.  Since the initial value of duration is None, you should first check if the duration values are None, and fail the test if they are.

The below included this by the way.


- jrose


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


On April 12, 2012, 4:26 p.m., jrose wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1853/
> -----------------------------------------------------------
> 
> (Updated April 12, 2012, 4:26 p.m.)
> 
> 
> Review request for Asterisk Developers, Mark Michelson, Paul Belanger, rmudgett, and Matt Jordan.
> 
> 
> Summary
> -------
> 
> This is a fairly simple CDRTestCase test for checking that ForkCDR behaves as expected with the e option.  It was made in response to the above bug.
> 
> Basically it just checks the expectations and then makes sure that the CDR logs both have some duration greater than 1 second (significant wiggle room).  Then it checks to
> see if the end time of the first came within one second of the start time of the last (the threshold is to accomodate for possible timing issues)
> 
> 
> This addresses bug ASTERISK-19164.
>     https://issues.asterisk.org/jira/browse/ASTERISK-19164
> 
> 
> Diffs
> -----
> 
>   /asterisk/trunk/tests/cdr/cdr_fork_end_time/configs/ast1/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/cdr_fork_end_time/configs/ast1/sip.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/cdr_fork_end_time/run-test PRE-CREATION 
>   /asterisk/trunk/tests/cdr/cdr_fork_end_time/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/cdr/tests.yaml 3170 
> 
> Diff: https://reviewboard.asterisk.org/r/1853/diff
> 
> 
> Testing
> -------
> 
> With Asterisk not having the patch from ASTERISK-19164, the test fails due to the duration of the second CDR being 0.
> With Asterisk having the patch, the test passes.  Also all the other CDR tests continue to pass as expected.
> 
> 
> Thanks,
> 
> jrose
> 
>

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


More information about the asterisk-dev mailing list