[asterisk-dev] [Code Review] Testsuite: Test for Queue Reload Members (performed via the AMI command, but they all use the same stuff)

jrose reviewboard at asterisk.org
Thu Sep 20 11:42:37 CDT 2012


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

(Updated Sept. 20, 2012, 11:42 a.m.)


Review request for Asterisk Developers and Matt Jordan.


Changes
-------

Address Paul's comments


Summary
-------

This test seems to work fine as far as pass/failure is concerned, but one thing that bugs me is that it always produces the following error:

[Sep 20 10:37:59] ERROR[25026]: AMI:192 connectionLost: Failure during connectionLost for callable <bound method QueueReloadMembersTest.reload_finished of <__main__.QueueReloadMembersTest object at 0x975668c>>: sequence index must be integer, not 'str'
<?xml version="1.0" encoding="utf-8"?>

at the end of the test.

The test itself is fairly simple.  Asterisk is started with one queue configuration, then another is swapped in for it and a QueueReload {Members: Yes} action is issued. Right now it fails in all versions of Asterisk because these queues get skipped during the reload in what seems to have been something of a coding snafu.  I've also created a patch which fixes this and I've tested the patch against this test, but in the spirit of test driven development, want to finish the test before the patch.


This addresses bug AST-956.
    https://issues.asterisk.org/jira/browse/AST-956


Diffs (updated)
-----

  /asterisk/trunk/lib/python/asterisk/asterisk.py 3472 
  /asterisk/trunk/tests/apps/queues/reload_queue_members/configs/ast1/queues.conf PRE-CREATION 
  /asterisk/trunk/tests/apps/queues/reload_queue_members/queues.conf.replacement PRE-CREATION 
  /asterisk/trunk/tests/apps/queues/reload_queue_members/run-test PRE-CREATION 
  /asterisk/trunk/tests/apps/queues/reload_queue_members/test-config.yaml PRE-CREATION 
  /asterisk/trunk/tests/apps/queues/tests.yaml 3472 

Diff: https://reviewboard.asterisk.org/r/2128/diff


Testing
-------

Ran the test both while forcing expectations to match results and when using the expectations as I would expect them to be based on the contents of the replacement queues.conf.  In both cases, failure/success occurs as expected.


Thanks,

jrose

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


More information about the asterisk-dev mailing list