[asterisk-dev] [Code Review] 3398: TestSuite: Fix tests affected by 411086

Matt Jordan reviewboard at asterisk.org
Wed Mar 26 09:42:38 CDT 2014



> On March 26, 2014, 9:16 a.m., Matt Jordan wrote:
> > I don't think this is the correct way to fix the problem. This works around what appears to be a valid problem.
> > 
> > If an application creates a bridge, it should receive the BridgeDestroyed events. It should not have to explicitly subscribe to the thing that it just created. Down that path lies all sorts of madness: do I have to subscribe to a channel if I create it? Yuck.
> > 
> > Unless I'm really misreading what is occurring here, this appears to be a bug in Asterisk, and should be fixed there.

Kinsey and I discussed this in #asterisk-dev. In general, this actually *is* behaving as designed. A subscription to a resource isn't implicitly created until that resource enters into a Stasis application, which hasn't occurred (and can't occur) for bridges. The problem is, there is nothing about an ARI HTTP request that tells Asterisk what applications the bridge should be subscribed to.

So, working as designed, but probably a design flaw.


- Matt


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3398/#review11375
-----------------------------------------------------------


On March 26, 2014, 8 a.m., opticron wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3398/
> -----------------------------------------------------------
> 
> (Updated March 26, 2014, 8 a.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Repository: testsuite
> 
> 
> Description
> -------
> 
> 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.
> 
> 
> Diffs
> -----
> 
>   asterisk/trunk/tests/rest_api/bridges/delete/bridge_delete.py 4885 
>   asterisk/trunk/tests/rest_api/bridges/bridge_by_id/test-config.yaml 4885 
> 
> Diff: https://reviewboard.asterisk.org/r/3398/diff/
> 
> 
> Testing
> -------
> 
> Made sure the tests got the events they were expecting.
> 
> 
> Thanks,
> 
> opticron
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140326/a3c2ab76/attachment-0001.html>


More information about the asterisk-dev mailing list