[asterisk-commits] stasis bridge: Ensure the test gives time for all events to ... (testsuite[master])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Feb 15 14:54:36 CST 2016


Anonymous Coward #1000019 has submitted this change and it was merged.

Change subject: stasis_bridge: Ensure the test gives time for all events to be received.
......................................................................


stasis_bridge: Ensure the test gives time for all events to be received.

This test terminates based on the hangup of the underlying channels
used during the test. This presents a race condition where the test
will terminate before the Stasis messages have been conveyed over the
ARI WebSocket.

This change makes it so an additional channel is originated and waits
for 10 seconds before continuing. This gives ample time for all events
and messages to be conveyed but does not alter the behavior of the
rest of the test.

Change-Id: Icf776149b9d0052b0db5be271608f508d2ee97ff
---
M tests/rest_api/external_interaction/bridge_app/x_option/stasis_bridge/configs/ast1/extensions.conf
M tests/rest_api/external_interaction/bridge_app/x_option/stasis_bridge/test-config.yaml
2 files changed, 10 insertions(+), 0 deletions(-)

Approvals:
  Kevin Harwell: Looks good to me, but someone else must approve
  Anonymous Coward #1000019: Verified
  Joshua Colp: Looks good to me, approved



diff --git a/tests/rest_api/external_interaction/bridge_app/x_option/stasis_bridge/configs/ast1/extensions.conf b/tests/rest_api/external_interaction/bridge_app/x_option/stasis_bridge/configs/ast1/extensions.conf
index 2e9465e..7c8c146 100644
--- a/tests/rest_api/external_interaction/bridge_app/x_option/stasis_bridge/configs/ast1/extensions.conf
+++ b/tests/rest_api/external_interaction/bridge_app/x_option/stasis_bridge/configs/ast1/extensions.conf
@@ -18,3 +18,6 @@
 	same => n,Stasis(testsuite,dummy)
 	same => n,Hangup()
 
+exten => wait,1,Answer
+        same => n,Wait(10)
+
diff --git a/tests/rest_api/external_interaction/bridge_app/x_option/stasis_bridge/test-config.yaml b/tests/rest_api/external_interaction/bridge_app/x_option/stasis_bridge/test-config.yaml
index 19eaf16..74fec29 100644
--- a/tests/rest_api/external_interaction/bridge_app/x_option/stasis_bridge/test-config.yaml
+++ b/tests/rest_api/external_interaction/bridge_app/x_option/stasis_bridge/test-config.yaml
@@ -51,6 +51,13 @@
             context: 'default'
             extension: 'echo'
             priority: '1'
+        -
+            # This channel explicitly waits to give time for all events to be received
+            channelId: 'wait'
+            endpoint: 'Local/wait at default'
+            context: 'default'
+            extension: 'echo'
+            priority: '1'
 
 pluggable-config:
     -

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icf776149b9d0052b0db5be271608f508d2ee97ff
Gerrit-PatchSet: 3
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>



More information about the asterisk-commits mailing list