[asterisk-dev] [Code Review] Rework the leave_voicemail_contexts test
Mark Michelson
reviewboard at asterisk.org
Thu May 3 09:51:41 CDT 2012
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1893/#review6139
-----------------------------------------------------------
/asterisk/trunk/tests/apps/voicemail/leave_voicemail_contexts/run-test
<https://reviewboard.asterisk.org/r/1893/#comment11242>
It appears that you have a potential race condition here. Say, for instance, that the ami with id 0 calls back into ami_connect() first (meaning you set self.amiReceiver). In the latter part of the method, you create a test controller and then call self.execute_test(). self.execute_test() immediately starts trying to use self.amiSender, which may not have been set yet.
Is there something I'm not seeing here that makes sure that both self.amiSender and self.amiReceiver have been set before self.execute_test() gets called?
- Mark
On May 1, 2012, 4:32 p.m., Matt Jordan wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1893/
> -----------------------------------------------------------
>
> (Updated May 1, 2012, 4:32 p.m.)
>
>
> Review request for Asterisk Developers.
>
>
> Summary
> -------
>
> This reworks the leave_voicemail_contexts test to:
> 1) Use the TEST_FRAMEWORK and test events to control the test, as opposed to a lot of Wait() statements
> 2) Actually test valid extensions that VoiceMail has a hope and a prayer of bouncing a user out to
> 3) Test the conditions that currently fail in Asterisk, namely the d(context) option failing if the extension the user attempts to go to does not exist in the current dialplan context.
>
> This review being checked in is contingent on review 1892 being approved.
>
>
> This addresses bug ASTERISK-18243.
> https://issues.asterisk.org/jira/browse/ASTERISK-18243
>
>
> Diffs
> -----
>
> /asterisk/trunk/tests/apps/voicemail/leave_voicemail_contexts/test-config.yaml 3212
> /asterisk/trunk/tests/apps/voicemail/leave_voicemail_contexts/configs/ast1/extensions.conf 3212
> /asterisk/trunk/tests/apps/voicemail/leave_voicemail_contexts/configs/ast1/voicemail.conf 3212
> /asterisk/trunk/tests/apps/voicemail/leave_voicemail_contexts/configs/ast2/extensions.conf 3212
> /asterisk/trunk/tests/apps/voicemail/leave_voicemail_contexts/run-test 3212
>
> Diff: https://reviewboard.asterisk.org/r/1893/diff
>
>
> Testing
> -------
>
>
> Thanks,
>
> Matt
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120503/6451e168/attachment.htm>
More information about the asterisk-dev
mailing list