[asterisk-commits] mjordan: testsuite/asterisk/trunk r4899 - /asterisk/trunk/tests/apps/channel_...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Mar 26 17:20:34 CDT 2014


Author: mjordan
Date: Wed Mar 26 17:20:27 2014
New Revision: 4899

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=4899
Log:
channel_redirect: wait a bit before hanging up the initiating channel

Strangely enough, in Asterisk 11, it is theoretically possible for a channel
to hit the Hangup application, then let another thread take over for awhile and
run to completion. In this case, that causes this test to fail, as the initiator
channel (which hangs up after the redirected channel) will still emit its event
first. That causes the scenario to cycle, resulting in the Hangup from the
redirected channel in the first scenario to be missed.

A small wait should fix that. Unfortunately, apptest doesn't have a mechanism to
combine events and wait on all expected events before performing an action. Such
a mechanism would be tricky to implement, but if this doesn't suffice, should be
the next step.

Modified:
    asterisk/trunk/tests/apps/channel_redirect/configs/ast1/extensions.conf

Modified: asterisk/trunk/tests/apps/channel_redirect/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/channel_redirect/configs/ast1/extensions.conf?view=diff&rev=4899&r1=4898&r2=4899
==============================================================================
--- asterisk/trunk/tests/apps/channel_redirect/configs/ast1/extensions.conf (original)
+++ asterisk/trunk/tests/apps/channel_redirect/configs/ast1/extensions.conf Wed Mar 26 17:20:27 2014
@@ -44,6 +44,7 @@
     same => n,Answer()
     same => n,ChannelRedirect(${REDIRECT_VAR},test,hang-me-up,1)
     same => n,ExecIf($[${CHANNELREDIRECT_STATUS}=SUCCESS]?UserEvent(TestResult,result:pass))
+    same => n,Wait(2)
     same => n,Hangup()
 
 exten => null-initiate,1,NoOp()




More information about the asterisk-commits mailing list