[asterisk-dev] [Code Review] 4293: testsuite: Add a test for PJSIP keep alive packets for connection oriented transports

Matt Jordan reviewboard at asterisk.org
Mon Dec 22 22:17:58 CST 2014


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

Review request for Asterisk Developers.


Repository: testsuite


Description
-------

This patch adds a test for the PJSIP keep_alive_interval option. It sets the keep_alive_interval to 2 seconds, makes a TCP client connection to the PJSIP stack, and then waits for 5 keep alives. Upon receiving 5 packets, it disconnects and stops the test.

In all cases, the test verifies on stopping:
* That 5 total packets were received
* That the time deltas between packets were received within approximately 2 seconds of each other
* That the keep alive values are all '\r\n\r\n'

Note that this test is being written for two reasons:
(1) Because tests are good
(2) So that the revision that added the keep_alive_interval option can be backported to Asterisk 13. As it turns out, having keep alives for connection oriented transports is super useful under certain non-ideal yet depressingly common network conditions.


Diffs
-----

  /asterisk/trunk/tests/channels/pjsip/tests.yaml 6133 
  /asterisk/trunk/tests/channels/pjsip/keep_alive/test-config.yaml PRE-CREATION 
  /asterisk/trunk/tests/channels/pjsip/keep_alive/keep_alive.py PRE-CREATION 
  /asterisk/trunk/tests/channels/pjsip/keep_alive/configs/ast1/pjsip.conf PRE-CREATION 

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


Testing
-------


Thanks,

Matt Jordan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20141223/147ca02e/attachment.html>


More information about the asterisk-dev mailing list