[asterisk-dev] [Code Review]: ConfBridge state machine tests - marked users

Matt Jordan reviewboard at asterisk.org
Thu Sep 27 18:17:42 CDT 2012



> On Sept. 27, 2012, 6:17 p.m., Matt Jordan wrote:
> > /asterisk/trunk/lib/python/asterisk/ami.py, lines 102-104
> > <https://reviewboard.asterisk.org/r/2130/diff/1/?file=31391#file31391line102>
> >
> >     Actually, it would currently throw an Exception.
> >     
> >     If a key is not in an event and we specified that we required it to not match that item, then I don't think we can say anything one way or the other about it.  If nothing else, continuing on may give false positives.
> >     
> >     Consider matching on this:
> >     
> >     Event: Foo
> >     Special: !bar
> >     
> >     If we match on Event: Foo and the event doesn't contain Special: at all, we would pass it up to the next level as an event match.  But that might not be what we want - what we want are all events that have the Special: field but do not contain bar.  If we want all events that merely match Event: Foo but don't contain that header, then we should have just specified matching on Event.

Sorry about this, somehow it decided this comment needed to be off by itself.


- Matt


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


On Sept. 24, 2012, 7:37 p.m., Matt Jordan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2130/
> -----------------------------------------------------------
> 
> (Updated Sept. 24, 2012, 7:37 p.m.)
> 
> 
> Review request for Asterisk Developers, Mark Michelson and Terry Wilson.
> 
> 
> Summary
> -------
> 
> Terry's patch on https://reviewboard.asterisk.org/r/2072/ addresses a fundamental problem in the initial design of ConfBridge, in that it did not adequately define or handle the interactions between Marked, Unmarked, and non-Marked users in a conference.  It fixed the various problems reported by users (in numerous ASTERISK issues) by implementing a state machine that moves the conference into various states based on the various types of users entering/leaving the conference.
> 
> Because the correct fix to these problems redoes a portion of ConfBridge, tests need to cover the functionality to (a) ensure things continue to work at least as well as they did and (b) that future changes to ConfBridge don't break the interaction behavior between users.  This patch provides the following to the Test Suite:
> 
> 1) A python module (apptest) that allows orchestrating tests inside of a long running application using a configuration driven approach.  This uses the same approach as the VoiceMail tests and the existing two ConfBridge tests, but defers the logic of how responses to various events are handled to the YAML file.
> 
> 2) A test using this that covers the interaction of Marked users in a conference.  This covers two scenarios from a ConfBridge test plan (which will be be put up on the wiki and linked to this review later):
> 
> Marked users:
>   Conference should automatically start for marked users and those users should
>   never be in an inactive conference state.
> 
>   Actors: Marked User One
>           Marked User Two w/ Quiet flag
> 
>   Scenario:
>     Marked User One enters conference.  Marked User One is notified they have
>     entered conference.  Verify no MOH.  Marked User Two enters conference.
>     Verify no announcements played to Marked User Two.  Marked User Two leaves
>     conference.  Verify no MOH for Marked User One.  Marked User One leaves
>     conference; verify conference ends.
> 
>   Scenario:
>     Marked User Two enters conference.  Verify Marked User Two does not
>     receive notification that they have entered the conference.  Verify no MOH.
>     Marked User One enters conference.  Marked User One leaves conference.
>     Verify no MOH for Marked User Two. Marked User Two leaves conference; verify
>     conference ends.
> 
> 
> Diffs
> -----
> 
>   /asterisk/trunk/lib/python/asterisk/apptest.py PRE-CREATION 
>   /asterisk/trunk/sample-yaml/apptest-config.yaml.sample PRE-CREATION 
>   /asterisk/trunk/tests/apps/confbridge/confbridge_marked/configs/ast1/confbridge.conf PRE-CREATION 
>   /asterisk/trunk/tests/apps/confbridge/confbridge_marked/configs/ast1/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/apps/confbridge/confbridge_marked/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/lib/python/asterisk/ami.py 3437 
>   /asterisk/trunk/tests/apps/confbridge/tests.yaml 3437 
> 
> Diff: https://reviewboard.asterisk.org/r/2130/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Matt
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120927/ecedff73/attachment.htm>


More information about the asterisk-dev mailing list