[asterisk-commits] jrose: testsuite/asterisk/trunk r4110 - /asterisk/trunk/lib/python/asterisk/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Sep 5 10:47:00 CDT 2013


Author: jrose
Date: Thu Sep  5 10:46:52 2013
New Revision: 4110

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=4110
Log:
Fix intermittent bridge test failures caused by unpredictable entry order

Prior to this patch, bridge tests (I'm thinking all of them now) would fail
intermittently in 12/trunk due to possible variance in entry order when it
comes to receiving bridge entry events. This test module was written with
the assumption that Alice would always enter first while testing revealed
that it was possible (though slightly rare) for Bob to enter first.

Review: https://reviewboard.asterisk.org/r/2812/

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

Modified: asterisk/trunk/lib/python/asterisk/BridgeTestCase.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/lib/python/asterisk/BridgeTestCase.py?view=diff&rev=4110&r1=4109&r2=4110
==============================================================================
--- asterisk/trunk/lib/python/asterisk/BridgeTestCase.py (original)
+++ asterisk/trunk/lib/python/asterisk/BridgeTestCase.py Thu Sep  5 10:46:52 2013
@@ -223,11 +223,13 @@
         if self.uut_bridge_id != event.get('bridgeuniqueid'):
             return
 
-        if self.uut_alice_channel is None:
-            self.uut_alice_channel = event.get('channel')
+        channel = event.get('channel')
+
+        if 'alice' in channel and self.uut_alice_channel is None:
+            self.uut_alice_channel = channel
             LOGGER.info('UUT Alice Channel: %s' % self.uut_alice_channel)
-        elif self.uut_bob_channel is None:
-            self.uut_bob_channel = event.get('channel')
+        elif 'bob' in channel and self.uut_bob_channel is None:
+            self.uut_bob_channel = channel
             LOGGER.info('UUT Bob Channel: %s' % self.uut_bob_channel)
             LOGGER.debug("Bridge is up between %s and %s"
                          % (self.uut_alice_channel, self.uut_bob_channel))




More information about the asterisk-commits mailing list