[asterisk-dev] [Code Review] SIP Dialog pre- / post-test condition checking

mjordan reviewboard at asterisk.org
Thu Sep 15 08:04:57 CDT 2011


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

(Updated Sept. 15, 2011, 8:04 a.m.)


Review request for Asterisk Developers and Paul Belanger.


Changes
-------

This tweaks up the SIP dialog checking to allow for SIP history statements to be configurable in the test-config.yaml.  Each test can therefore define what entries in the SIP history should be present.

In order to do this, the TestConditionConfig object is now injected into each instance of TestCondition during creation.  The derived implementations of TestCondition are responsible for obtaining their specific configuration items out of the TestConditionConfig's yaml configuration object as needed.

This also allows the ThreadTestCondition to be configured with threads to ignore, as testing has shown that some tests will have some threads lingering based on timing issues.


Summary
-------

This adds the ability to check for SIP dialogs before and after a test run.  Before a test run, the presence of any SIP dialogs is treated as a test failure.  After a test run, SIP dialogs are allowed to exist, as they will most likely be scheduled for deletion (which could be up to 32 seconds after the test has completed executing).  However, the SIP history is checked for each present dialog to ensure that the SIP dialog includes a hangup, and that it was scheduled for destruction with the scheduler.


Diffs (updated)
-----

  /asterisk/team/mjordan/test_conditions/trunk/lib/python/asterisk/SipDialogTestCondition.py PRE-CREATION 
  /asterisk/team/mjordan/test_conditions/trunk/lib/python/asterisk/TestConditions.py 2207 
  /asterisk/team/mjordan/test_conditions/trunk/lib/python/asterisk/TestConfig.py 2207 
  /asterisk/team/mjordan/test_conditions/trunk/lib/python/asterisk/ThreadTestCondition.py 2207 
  /asterisk/team/mjordan/test_conditions/trunk/tests/apps/voicemail/authenticate_nominal/test-config.yaml 2207 
  /asterisk/team/mjordan/test_conditions/trunk/tests/apps/voicemail/check_voicemail_new_user/test-config.yaml 2207 
  /asterisk/team/mjordan/test_conditions/trunk/tests/apps/voicemail/check_voicemail_nominal/test-config.yaml 2207 
  /asterisk/team/mjordan/test_conditions/trunk/tests/apps/voicemail/func_vmcount/test-config.yaml 2207 
  /asterisk/team/mjordan/test_conditions/trunk/tests/apps/voicemail/leave_voicemail_nominal/test-config.yaml 2207 

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


Testing
-------

Local machine, including unit tests for parsing of Asterisk CLI responses.


Thanks,

mjordan

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


More information about the asterisk-dev mailing list