[asterisk-commits] sgriepentrog: testsuite/asterisk/trunk r4501 - /asterisk/trunk/lib/python/ast...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Dec 20 11:00:26 CST 2013


Author: sgriepentrog
Date: Fri Dec 20 11:00:24 2013
New Revision: 4501

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=4501
Log:
testsuite: insure core waitfullybooted has completed

Spurious test failures can occur when the test process starts
before Asterisk has fully booted.  This patch corrects a case
where the waitfullbooted command was issued but not completed
by checking that the output has a confirmation message.


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

Modified: asterisk/trunk/lib/python/asterisk/asterisk.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/lib/python/asterisk/asterisk.py?view=diff&rev=4501&r1=4500&r2=4501
==============================================================================
--- asterisk/trunk/lib/python/asterisk/asterisk.py (original)
+++ asterisk/trunk/lib/python/asterisk/asterisk.py Fri Dec 20 11:00:24 2013
@@ -276,7 +276,13 @@
 
         def __wait_fully_booted_callback(cli_command):
             """ Callback for CLI command waitfullybooted """
-            self.__start_deferred.callback("Successfully started Asterisk %s" % self.host)
+            if "Asterisk has fully booted" in cli_command.output:
+                self.__start_deferred.callback("Successfully started Asterisk %s" % self.host)
+            else:
+                logger.debug("Asterisk core waitfullybooted failed " +
+                             "with output '%s', attempting again..." %
+                             cli_command.output)
+                reactor.callLater(1, __execute_wait_fully_booted)
 
         def __wait_fully_booted_error(cli_command):
             """ Errback for CLI command waitfullybooted """




More information about the asterisk-commits mailing list