[asterisk-dev] [Code Review] 3032: Testsuite: ARI device state
Kevin Harwell
reviewboard at asterisk.org
Mon Dec 2 11:33:22 CST 2013
> On Nov. 27, 2013, 12:33 p.m., Matt Jordan wrote:
> > /asterisk/trunk/tests/rest_api/applications/subscribe-deviceState/subscribe_deviceState.py, lines 36-37
> > <https://reviewboard.asterisk.org/r/3032/diff/1/?file=48779#file48779line36>
> >
> > What happens if these asserts fail?
> >
> > Often, exceptions in twisted deferred callbacks have a tendency to get swallowed, particularly if there is no errback or an errback assigned that doesn't properly handle it. I'm curious if this actually triggers a test failure, or if you need to explicitly return False here.
Looking at the ari.py code it seems that the "on_event" handler catches assert/exception(s) and will fail the test. I also temporarily modified the test to make the assert throw an error and the test failed accordingly.
- Kevin
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3032/#review10292
-----------------------------------------------------------
On Nov. 25, 2013, noon, Kevin Harwell wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3032/
> -----------------------------------------------------------
>
> (Updated Nov. 25, 2013, noon)
>
>
> Review request for Asterisk Developers.
>
>
> Bugs: ASTERISK-22838
> https://issues.asterisk.org/jira/browse/ASTERISK-22838
>
>
> Repository: testsuite
>
>
> Description
> -------
>
> Tests to make sure a device state can be created, changed and deleted using ARI. Also tests to make make sure an application can [un]subscribe to device state and receive change events.
>
>
> Diffs
> -----
>
> /asterisk/trunk/tests/rest_api/tests.yaml 4366
> /asterisk/trunk/tests/rest_api/device_state/tests.yaml PRE-CREATION
> /asterisk/trunk/tests/rest_api/device_state/list/test-config.yaml PRE-CREATION
> /asterisk/trunk/tests/rest_api/device_state/list/device_state.py PRE-CREATION
> /asterisk/trunk/tests/rest_api/device_state/list/configs/ast1/extensions.conf PRE-CREATION
> /asterisk/trunk/tests/rest_api/device_state/change/test-config.yaml PRE-CREATION
> /asterisk/trunk/tests/rest_api/device_state/change/device_state.py PRE-CREATION
> /asterisk/trunk/tests/rest_api/device_state/change/configs/ast1/extensions.conf PRE-CREATION
> /asterisk/trunk/tests/rest_api/device_state/add_remove/test-config.yaml PRE-CREATION
> /asterisk/trunk/tests/rest_api/device_state/add_remove/device_state.py PRE-CREATION
> /asterisk/trunk/tests/rest_api/device_state/add_remove/configs/ast1/extensions.conf PRE-CREATION
> /asterisk/trunk/tests/rest_api/device_state/add_invalid/test-config.yaml PRE-CREATION
> /asterisk/trunk/tests/rest_api/device_state/add_invalid/device_state.py PRE-CREATION
> /asterisk/trunk/tests/rest_api/device_state/add_invalid/configs/ast1/extensions.conf PRE-CREATION
> /asterisk/trunk/tests/rest_api/applications/tests.yaml 4366
> /asterisk/trunk/tests/rest_api/applications/subscribe-deviceState/test-config.yaml PRE-CREATION
> /asterisk/trunk/tests/rest_api/applications/subscribe-deviceState/subscribe_deviceState.py PRE-CREATION
> /asterisk/trunk/tests/rest_api/applications/subscribe-deviceState/configs/ast1/extensions.conf PRE-CREATION
> /asterisk/trunk/tests/rest_api/applications/subscribe-channel/subscribe_channel.py 4366
> /asterisk/trunk/tests/rest_api/applications/subscribe-bridge/test-config.yaml 4366
> /asterisk/trunk/tests/rest_api/applications/subscribe-bridge/subscribe_bridge.py 4366
> /asterisk/trunk/lib/python/asterisk/ari.py 4366
>
> Diff: https://reviewboard.asterisk.org/r/3032/diff/
>
>
> Testing
> -------
>
> Ran tests and made sure they passed.
>
>
> Thanks,
>
> Kevin Harwell
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20131202/09a8bbc7/attachment-0001.html>
More information about the asterisk-dev
mailing list