[asterisk-commits] mjordan: testsuite/asterisk/trunk r4305 - /asterisk/trunk/lib/python/asterisk/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Oct 30 09:44:03 CDT 2013


Author: mjordan
Date: Wed Oct 30 09:44:00 2013
New Revision: 4305

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=4305
Log:
Enable twisted logging

This patch enables logging from twisted to our Python log file. This can get
*quite* verbose, so hopefully this is only a temporary condition.

Note that we're enabling this do to some hung tests on the Bamboo build agents.
The hangs appear to be occurring due to an exception in one of the process
managers; however, that exception is not getting propagated up as it appears
to be getting caught down in twisted. This should allow us to figure out what
is throwing the exception the next time it happens.

Modified:
    asterisk/trunk/lib/python/asterisk/TestCase.py

Modified: asterisk/trunk/lib/python/asterisk/TestCase.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/lib/python/asterisk/TestCase.py?view=diff&rev=4305&r1=4304&r2=4305
==============================================================================
--- asterisk/trunk/lib/python/asterisk/TestCase.py (original)
+++ asterisk/trunk/lib/python/asterisk/TestCase.py Wed Oct 30 09:44:00 2013
@@ -17,7 +17,7 @@
 import uuid
 from hashlib import md5
 from twisted.internet import reactor, defer
-from twisted.python import failure
+from twisted.python import failure, log
 from starpy import manager, fastagi
 
 from asterisk import Asterisk
@@ -124,6 +124,11 @@
         self.__setup_conditions()
 
         logger.info("Executing " + self.test_name)
+
+        # Enable twisted logging
+        observer = log.PythonLoggingObserver()
+        observer.start()
+
         reactor.callWhenRunning(self.__run)
 
     def __setup_conditions(self):




More information about the asterisk-commits mailing list