[asterisk-dev] [Code Review]: Get mixmonitor_audiohook_inherit test working again

jrose reviewboard at asterisk.org
Tue Oct 23 14:53:37 CDT 2012



> On Oct. 6, 2012, 11:57 a.m., Matt Jordan wrote:
> > /asterisk/trunk/tests/apps/mixmonitor_audiohook_inherit/run-test, line 67
> > <https://reviewboard.asterisk.org/r/2139/diff/2/?file=31650#file31650line67>
> >
> >     I don't think this method exists :-)
> >     
> >     To catch these kinds of errors, you may want to consider running pylint on your code.  Even if you decide not to fix all of the style findings (which are still good to fix), it will catch errors like this and flag them for you.
> 
> jrose wrote:
>     I'm having some trouble with this at the moment. I've got pylint working more or less, and it flags a number of potential errors and warnings, but it also flags problems that don't really exist due to stuff that comes from TestCase, so it's also flagging things like self.stop_reactor() as being missing in the same way.  Do you know how I get pylint to properly include our libraries?

Eh, I came up with a kinda lame workaround. In any event I got rid of most of the things pylint reported. Now I just get the following:

root at JonUbuntu:~/AsteriskWorkspace/fix_mixmonitor_audiohook_inherit_test/1.8/xsuite# pylint tests/apps/mixmonitor_audiohook_inherit/run-test 
************* Module run-test
C:  1: Invalid name "run-test" (should match (([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$)
Exception RuntimeError: 'maximum recursion depth exceeded while calling a Python object' in <type 'exceptions.AttributeError'> ignored
Exception RuntimeError: 'maximum recursion depth exceeded while calling a Python object' in <type 'exceptions.AttributeError'> ignored
E:120:main: Module 'twisted.internet.reactor' has no 'run' member


> On Oct. 6, 2012, 11:57 a.m., Matt Jordan wrote:
> > /asterisk/trunk/tests/apps/mixmonitor_audiohook_inherit/test-config.yaml, lines 5-12
> > <https://reviewboard.asterisk.org/r/2139/diff/2/?file=31651#file31651line5>
> >
> >     This description is no longer accurate, as the console channel driver is no longer used.

I've tweaked the description to mention that it uses a local channel instead of console and that it also performs additional checks with user events and test events to confirm MixMonitor's end.


> On Oct. 6, 2012, 11:57 a.m., Matt Jordan wrote:
> > /asterisk/trunk/tests/apps/mixmonitor_audiohook_inherit/test-config.yaml, line 15
> > <https://reviewboard.asterisk.org/r/2139/diff/2/?file=31651#file31651line15>
> >
> >     Since you're using TestEvents, this min version needs to bumped to the minimum version of Asterisk (1.8) that would contain these test events.

Changed to 1.8.19.0 (presuming this goes in before that gets tagged)


> On Oct. 6, 2012, 11:57 a.m., Matt Jordan wrote:
> > /asterisk/trunk/tests/apps/mixmonitor_audiohook_inherit/run-test, line 71
> > <https://reviewboard.asterisk.org/r/2139/diff/2/?file=31650#file31650line71>
> >
> >     Add an errback handler to this Originate.  You expect the call to get Answered, and if for some reason it doesn't, you would want to fail the test.

check. Also changed from cli_originate to an AMI originate.


- jrose


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


On Oct. 1, 2012, 6:01 p.m., jrose wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2139/
> -----------------------------------------------------------
> 
> (Updated Oct. 1, 2012, 6:01 p.m.)
> 
> 
> Review request for Asterisk Developers and Matt Jordan.
> 
> 
> Summary
> -------
> 
> This is part of an effort to get tests working that are currently being skipped due to failures. I went ahead and changed this test to use the TestCase class since the old way of doing things was driving me nuts with various problems.
> 
> 
> Diffs
> -----
> 
>   /asterisk/trunk/tests/apps/mixmonitor_audiohook_inherit/configs/ast1/extensions.conf 3480 
>   /asterisk/trunk/tests/apps/mixmonitor_audiohook_inherit/configs/ast1/features.conf PRE-CREATION 
>   /asterisk/trunk/tests/apps/mixmonitor_audiohook_inherit/configs/ast1/manager.conf 3480 
>   /asterisk/trunk/tests/apps/mixmonitor_audiohook_inherit/run-test 3480 
>   /asterisk/trunk/tests/apps/mixmonitor_audiohook_inherit/test-config.yaml 3480 
> 
> Diff: https://reviewboard.asterisk.org/r/2139/diff
> 
> 
> Testing
> -------
> 
> To test the test I ran the test with normal conditions, with an improper filename specified for the mixmonitor command, and also with turning off audiohook_inherit. All deviations caused failure as expected.
> 
> 
> Thanks,
> 
> jrose
> 
>

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


More information about the asterisk-dev mailing list