[asterisk-dev] [Code Review] cdr congestion log test

Paul Belanger reviewboard at asterisk.org
Mon Aug 1 12:14:04 CDT 2011


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


Also, I'd like to get away of the habit of 'copying' tests to create a different test case. So in this example of CDRs, we could create another class CDRTestCase() that inherits TestCase().  Removing 95% of the duplicate code.

Moving forward I see maintaining of the testsuite to be an issue if we keep coping tests.

- Paul


On Aug. 1, 2011, 11:17 a.m., jrose wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1334/
> -----------------------------------------------------------
> 
> (Updated Aug. 1, 2011, 11:17 a.m.)
> 
> 
> Review request for Asterisk Developers and Paul Belanger.
> 
> 
> Summary
> -------
> 
> https://reviewboard.asterisk.org/r/1331/
> 
> This is a test for a feature that logs congested calls as CONGESTION rather than as FAILURE.  This should have been a five minute rewrite, but I found a number or problems along the way involving things like long directory names.
> 
> This test is essentially a copy of the other congestion test, only with a sip setting change and a difference in expectations as well as a difference in the minversion requirement.  This test should (important qualifier) only run on trunk builds, but that is still untested and I'm not entirely sure how to indicate versions above 1.8 right now in testsuite.
> 
> Perhaps it would be more proper to work this into the other test and change the expectation depending on the minversion instead (and just always have the cdr.conf file set to have congestion=yes)
> 
> congestion = yes in cdr.conf is still an unmerged feature in trunk, so in order to test this without getting failure every time, it is necessary to apply the patch in r/1331 above to trunk.
> 
> Also, I'm not 100% sure if the folder name for this test is appropriate.  I had to change the folder name from something else in order to make it not randomly fail (presumably from too long of a path name, but I don't really see why that's a problem)
> 
> 
> Diffs
> -----
> 
>   /asterisk/trunk/tests/cdr/console_dial_sip_congestion_log/configs/ast1/cdr.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_dial_sip_congestion_log/configs/ast1/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_dial_sip_congestion_log/configs/ast1/manager.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_dial_sip_congestion_log/configs/ast1/sip.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_dial_sip_congestion_log/configs/ast2/cdr.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_dial_sip_congestion_log/configs/ast2/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_dial_sip_congestion_log/configs/ast2/sip.conf PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_dial_sip_congestion_log/run-test PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_dial_sip_congestion_log/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/cdr/console_dial_sip_congestion_log/test-output.txt PRE-CREATION 
>   /asterisk/trunk/tests/cdr/tests.yaml 1790 
> 
> Diff: https://reviewboard.asterisk.org/r/1334/diff
> 
> 
> Testing
> -------
> 
> Ran the test until I got the CDR log reporting as expected and for the test to be able to read that like it should be.  It isn't very complicated since it works basically the same as the other congestion test.
> 
> 
> Thanks,
> 
> jrose
> 
>

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


More information about the asterisk-dev mailing list