[asterisk-dev] [Code Review] Initial set of Queue tests

Mark Michelson mmichelson at digium.com
Tue Jun 1 12:58:30 CDT 2010



> On 2010-05-27 17:26:59, David Vossel wrote:
> > /asterisk/trunk/tests/queues/macro_gosub_test/test.lua, lines 50-81
> > <https://reviewboard.asterisk.org/r/638/diff/1/?file=9927#file9927line50>
> >
> >     Between getting the originate response and reading the manager events, it is unclear to me how we offer some sort of guarantee that the SetVar event's in the dialplan have had enough time to execute and queue onto the socket.  Perhaps a short delay right before man:pump_messages() would work.  The way it is now, I could see this working on your test machine, and then failing on a slower machine just because those events didn't get fired and queued fast enough.
> >     
> >     Also, if you wanted you could move passmacro and passgosub into the global space to avoid any confusion with them being accessed in the event handler.  This doesn't really bother me though.

By the time we get to the pump_messages() call, the only thing guaranteed is that the queue member has answered. Now, the macro or gosub executes immediately after the answer, so a small sleep would do well here. I will get this taken care of.


> On 2010-05-27 17:26:59, David Vossel wrote:
> > /asterisk/trunk/tests/queues/position_priority_maxlen/test.lua, lines 87-89
> > <https://reviewboard.asterisk.org/r/638/diff/1/?file=9932#file9932line87>
> >
> >     Should you be killing the asterisk instance here?

No, the test framework will take care of that for me. I can add it anyway just to be more awesome though.


- Mark


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


On 2010-04-30 16:46:45, Mark Michelson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/638/
> -----------------------------------------------------------
> 
> (Updated 2010-04-30 16:46:45)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> A set of five queue tests.
> 
> 1. Queue Baseline: Places a call to a queue and ensures that the call goes through as expected by watching for manager events
> 2. Wrapup Time: Places calls to queue members and then ensures that the member cannot be reached during wrapuptime. Tests both regular queues and sharedlastcall instances.
> 3. Gosub/macro: Tests that macros and gosubs are executed as expected when a member answers. Tests both static configuration and overriding with parameters to the Queue application.
> 4. Ringinuse and Pause: Tests that members are not called if ringinuse=no. Ensures that autopause only takes effect if the member is attempted to be called. Ensures that paused members do not get called.
> 5. Position, Priority, and maxlen: Adds a bunch of callers to a queue and ensures that they enter at the position we expect them to.
> 
> I have ideas for about 15 more tests, but those will have to come later.
> 
> 
> Diffs
> -----
> 
>   /asterisk/trunk/tests/queues/macro_gosub_test/configs/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/queues/macro_gosub_test/configs/queues.conf PRE-CREATION 
>   /asterisk/trunk/tests/queues/macro_gosub_test/run-test PRE-CREATION 
>   /asterisk/trunk/tests/queues/macro_gosub_test/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/queues/macro_gosub_test/test.lua PRE-CREATION 
>   /asterisk/trunk/tests/queues/position_priority_maxlen/configs/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/queues/position_priority_maxlen/configs/queues.conf PRE-CREATION 
>   /asterisk/trunk/tests/queues/position_priority_maxlen/run-test PRE-CREATION 
>   /asterisk/trunk/tests/queues/position_priority_maxlen/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/queues/position_priority_maxlen/test.lua PRE-CREATION 
>   /asterisk/trunk/tests/queues/queue_baseline/configs/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/queues/queue_baseline/configs/queues.conf PRE-CREATION 
>   /asterisk/trunk/tests/queues/queue_baseline/run-test PRE-CREATION 
>   /asterisk/trunk/tests/queues/queue_baseline/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/queues/queue_baseline/test.lua PRE-CREATION 
>   /asterisk/trunk/tests/queues/ringinuse_and_pause/configs/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/queues/ringinuse_and_pause/configs/queues.conf PRE-CREATION 
>   /asterisk/trunk/tests/queues/ringinuse_and_pause/configs/sip.conf PRE-CREATION 
>   /asterisk/trunk/tests/queues/ringinuse_and_pause/run-test PRE-CREATION 
>   /asterisk/trunk/tests/queues/ringinuse_and_pause/sipp/uas.xml PRE-CREATION 
>   /asterisk/trunk/tests/queues/ringinuse_and_pause/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/queues/ringinuse_and_pause/test.lua PRE-CREATION 
>   /asterisk/trunk/tests/queues/wrapup_time/configs/ast1/queues.conf PRE-CREATION 
>   /asterisk/trunk/tests/queues/wrapup_time/configs/ast2/queues.conf PRE-CREATION 
>   /asterisk/trunk/tests/queues/wrapup_time/configs/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/queues/wrapup_time/run-test PRE-CREATION 
>   /asterisk/trunk/tests/queues/wrapup_time/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/queues/wrapup_time/test.lua PRE-CREATION 
>   /asterisk/trunk/tests/tests.yaml 275 
> 
> Diff: https://reviewboard.asterisk.org/r/638/diff
> 
> 
> Testing
> -------
> 
> Ran the tests. They pass.
> 
> 
> Thanks,
> 
> Mark
> 
>




More information about the asterisk-dev mailing list