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

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Aug 13 10:26:46 CDT 2012


Author: mjordan
Date: Mon Aug 13 10:26:42 2012
New Revision: 3429

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=3429
Log:
Fix issues with stopping scenario instances when using the SIPpTestCase object

Some syntax errors prevented scenarios from completing successfully.  These
errors were introduced when logic for handling 'stuck' SIPp scenarios was
introduced.

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

Modified: asterisk/trunk/lib/python/asterisk/sipp.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/lib/python/asterisk/sipp.py?view=diff&rev=3429&r1=3428&r2=3429
==============================================================================
--- asterisk/trunk/lib/python/asterisk/sipp.py (original)
+++ asterisk/trunk/lib/python/asterisk/sipp.py Mon Aug 13 10:26:42 2012
@@ -81,8 +81,10 @@
     def stop_asterisk(self):
         ''' Kill any remaining SIPp scenarios '''
         for scenario in self.scenarios:
-            if not scenario.exited:
-                scenario.kill()
+            for instance in scenario:
+                if not instance.exited:
+                    LOGGER.info("Forcibly killing %s" % instance.name)
+                    instance.kill()
 
 
     def ami_connect(self, ami):
@@ -169,7 +171,7 @@
             scenario_set = defined_scenario_set['scenarios']
             # Build a list of SIPpScenario objects to run in parallel from
             # each set of scenarios in the YAML config
-            scenarios.append([SIPpScenario(self.test_name,
+            self.scenarios.append([SIPpScenario(self.test_name,
                                            scenario['key-args'],
                                            [] if 'ordered-args' not in scenario else scenario['ordered-args'])
                                            for scenario in scenario_set])
@@ -178,7 +180,7 @@
         final_deferred.addCallback(_final_deferred_callback)
         final_deferred.addCallback(_finish_test)
         sipp_sequence = SIPpScenarioSequence(self,
-                                             scenarios,
+                                             self.scenarios,
                                              self._fail_on_any,
                                              self._intermediate_callback_fn,
                                              final_deferred)




More information about the svn-commits mailing list