[asterisk-commits] kmoore: testsuite/asterisk/trunk r4930 - in /asterisk/trunk/tests/rest_api/br...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Apr 4 09:32:59 CDT 2014
Author: kmoore
Date: Fri Apr 4 09:32:47 2014
New Revision: 4930
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=4930
Log:
TestSuite: Fix tests affected by 411086
This fixes the two tests affected by the fix (r411086) to the bridge
subscription leak. They were depending on the leaked subscription to
catch bridge destruction events instead of holding an explicit
subscription for that purpose. They now explicitly subscribe to and
unsubscribe from the bridge at creation and destruction as necessary.
Review: https://reviewboard.asterisk.org/r/3398/
Modified:
asterisk/trunk/tests/rest_api/bridges/bridge_by_id/test-config.yaml
asterisk/trunk/tests/rest_api/bridges/delete/bridge_delete.py
Modified: asterisk/trunk/tests/rest_api/bridges/bridge_by_id/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rest_api/bridges/bridge_by_id/test-config.yaml?view=diff&rev=4930&r1=4929&r2=4930
==============================================================================
--- asterisk/trunk/tests/rest_api/bridges/bridge_by_id/test-config.yaml (original)
+++ asterisk/trunk/tests/rest_api/bridges/bridge_by_id/test-config.yaml Fri Apr 4 09:32:47 2014
@@ -58,6 +58,12 @@
bridgeId: 'MyFirstBridge'
# note: creating bridge does not result in another event
-
+ # note: an explicit subscription to the bridge is required to catch BridgeDestroyed later
+ method: 'post'
+ uri: 'applications/testsuite/subscription'
+ params:
+ eventSource: 'bridge:MyFirstBridge'
+ -
method: 'post'
uri: 'channels'
params:
@@ -110,8 +116,15 @@
id: 'MyFirstBridge$'
count: 1
requests:
- method: 'delete'
- uri: 'channels/MyFirstChannel'
+ -
+ # remove the explicit subscription
+ method: 'delete'
+ uri: 'applications/testsuite/subscription'
+ params:
+ eventSource: 'bridge:MyFirstBridge'
+ -
+ method: 'delete'
+ uri: 'channels/MyFirstChannel'
-
conditions:
match:
Modified: asterisk/trunk/tests/rest_api/bridges/delete/bridge_delete.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rest_api/bridges/delete/bridge_delete.py?view=diff&rev=4930&r1=4929&r2=4930
==============================================================================
--- asterisk/trunk/tests/rest_api/bridges/delete/bridge_delete.py (original)
+++ asterisk/trunk/tests/rest_api/bridges/delete/bridge_delete.py Fri Apr 4 09:32:47 2014
@@ -33,6 +33,8 @@
TEST.bridge_id = ari.post('bridges').json()['id']
ari.post('channels', TEST.channel_id, 'answer')
ari.post('bridges', TEST.bridge_id, 'addChannel', channel=TEST.channel_id)
+ ari.post('applications', 'testsuite', 'subscription',
+ eventSource='bridge:%s' % TEST.bridge_id)
return True
@@ -55,6 +57,8 @@
no longer exists in the system but that the channel that was in the bridge
still does exist.
"""
+ ari.delete('applications', 'testsuite', 'subscription',
+ eventSource='bridge:%s' % TEST.bridge_id)
bridge_id = event['bridge']['id']
assert TEST.bridge_id == bridge_id
result = True
More information about the asterisk-commits
mailing list