[Asterisk-code-review] Fix failing masquerade test on 13+ (testsuite[master])

Mark Michelson asteriskteam at digium.com
Mon Apr 20 18:20:10 CDT 2015


Mark Michelson has uploaded a new change for review.

  https://gerrit.asterisk.org/170

Change subject: Fix failing masquerade test on 13+
......................................................................

Fix failing masquerade test on 13+

The 13 branch recently received a change that by default prevents a
chain of more than 20 channels from being dialed on a single call. This
causes the masquerade test to fail since it expects to have a chain of
200 channels to optimize.

The fix is to use the CHANNEL(max_forwards) function to allow for enough
of a chain to be created. With this patch, the failing masquerade test
now passes.

ASTERISK-24985 #close
Reported by Mark Michelson

Change-Id: I87d76a0bb245b977bb0b2e545e6f38088ddb2f00
---
M tests/masquerade/configs/ast1/extensions.conf
M tests/masquerade/run-test
2 files changed, 8 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/70/170/1

diff --git a/tests/masquerade/configs/ast1/extensions.conf b/tests/masquerade/configs/ast1/extensions.conf
index 59ce0b7..8010a4c 100644
--- a/tests/masquerade/configs/ast1/extensions.conf
+++ b/tests/masquerade/configs/ast1/extensions.conf
@@ -4,7 +4,13 @@
 lastaction=""
 
 [outgoing]
+
+exten => start,1,NoOp()
+same => n,Set(CHANNEL(max_forwards)= 2000)
+same => n,Goto(outgoing,${DEST},1)
+
 exten => _XXXX,1,NoOp(Local channel chain to park call)
+exten => _XXXX,n,Set(CHANNEL(max_forwards)=200)
 exten => _XXXX,n,UserEvent(dialing,status: EXECUTING ${CHANNEL(name)})
 exten => _XXXX,n,Set(NEXT=$[${EXTEN} - 1])
 exten => _XXXX,n,GotoIf($[${NEXT:1} = 000]?last)
diff --git a/tests/masquerade/run-test b/tests/masquerade/run-test
index 3166a4e..74c0f79 100755
--- a/tests/masquerade/run-test
+++ b/tests/masquerade/run-test
@@ -98,9 +98,9 @@
                 ).addErrback(TestCase.handle_originate_failure)
             return
         self.ami[0].originate(
-            channel="Local/" + str(exten) + "@outgoing",
+            channel="Local/start at outgoing",
             context="parked", exten="parkme12", priority=1,
-            timeout=900, async=True
+            timeout=900, async=True, variable={'DEST': str(exten)}
             ).addErrback(TestCase.handle_originate_failure)
 
     def get_parkedcall(self):

-- 
To view, visit https://gerrit.asterisk.org/170
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I87d76a0bb245b977bb0b2e545e6f38088ddb2f00
Gerrit-PatchSet: 1
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Mark Michelson <mmichelson at digium.com>



More information about the asterisk-code-review mailing list