[asterisk-commits] mjordan: testsuite/asterisk/trunk r6433 - /asterisk/trunk/tests/cdr/cdr-tests.py

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Feb 14 21:48:55 CST 2015


Author: mjordan
Date: Sat Feb 14 21:48:53 2015
New Revision: 6433

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=6433
Log:
tests/cdr/cdr-tests: Improve ERROR message for ForkCDR tests

When ForkCDR tests fail, they don't currently spit out the durations of the
CDR entries. This improves the ERROR message to provide that information.

Modified:
    asterisk/trunk/tests/cdr/cdr-tests.py

Modified: asterisk/trunk/tests/cdr/cdr-tests.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/cdr/cdr-tests.py?view=diff&rev=6433&r1=6432&r2=6433
==============================================================================
--- asterisk/trunk/tests/cdr/cdr-tests.py (original)
+++ asterisk/trunk/tests/cdr/cdr-tests.py Sat Feb 14 21:48:53 2015
@@ -88,8 +88,11 @@
             (self.test_object.ast[0].base,
              self.test_object.ast[0].directories['astlogdir'], "cdrtest_local"))
 
-        if int(cdr1[0].duration) < int(cdr1[1].duration):
-            LOGGER.error("Fail: Original CDR duration shorter than forked")
+        original = int(cdr1[0].duration)
+        forked = int(cdr1[1].duration)
+        if original < forked:
+            LOGGER.error("Fail: Original CDR duration '%d' shorter than "
+                         "forked '%d'" % (original, forked))
             self.test_object.set_passed(False)
         return
 




More information about the asterisk-commits mailing list