[asterisk-commits] mjordan: testsuite/asterisk/trunk r6432 - /asterisk/trunk/tests/channels/SIP/...

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


Author: mjordan
Date: Sat Feb 14 21:44:02 2015
New Revision: 6432

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=6432
Log:
tests/channels/SIP/sip_attended_transfer: Make test a bit less bouncy

Depending on the speed of the machine, we may get a few extra Link/Unlink
Bridge events. Due to how the test was tracking the channels, this could
cause it to think that the same channel was bridged with itself. As a result,
we'd fail to detect things later in the test. This patch updates the test to
not track the same channel twice.

This should make the test more reliable on versions prior to Asterisk 12.
There's still a few other test failures in the Test Suite, wherein PJSIP
fails to return control to the Test Suite while waiting for registration.
This is due to it conflicting with twisted - but that's a problem for another
patch.

Modified:
    asterisk/trunk/tests/channels/SIP/sip_attended_transfer/run-test

Modified: asterisk/trunk/tests/channels/SIP/sip_attended_transfer/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/sip_attended_transfer/run-test?view=diff&rev=6432&r1=6431&r2=6432
==============================================================================
--- asterisk/trunk/tests/channels/SIP/sip_attended_transfer/run-test (original)
+++ asterisk/trunk/tests/channels/SIP/sip_attended_transfer/run-test Sat Feb 14 21:44:02 2015
@@ -106,6 +106,12 @@
         transfers end_b to end_c.
         '''
 
+        # We can get a few Link/Unlink events before the transfer kicks
+        # off; don't track channels twice
+        if event['channel2'] in self.chans:
+            return
+
+        LOGGER.debug("Tracking channel %s" % event['channel2'])
         self.chans.append(event['channel2'])
         numchans = len(self.chans)
         if numchans == 1:




More information about the asterisk-commits mailing list