<p>Jenkins2 <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/8687">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Benjamin Keith Ford: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
Jenkins2: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">sipp.py: Disable retransmissions<br><br>The majority of SIPp based tests do not need re-transmissions enabled. In these<br>cases if a re-transmission occurred and there was no packet loss then Asterisk<br>would respond twice, thus usually failing the test (this was the cause of<br>several sporadic test failures).<br><br>This patch disables re-transmissions for all SIPp based tests by default. If a<br>test does need SIPp to send re-transmissions then the test needs to specify the<br>something like the following ordered argument in the scenario's configuration:<br><br> 'ordered-args': ['-enable-retrans']<br><br>Two tests appear to fail unless re-transmissions are enabled. This patch<br>modifies the configuration for those two tests in order to allow 'retrans':<br><br>tests/channels/pjsip/qualify/qualify_timeout/<br>tests/channels/pjsip/basic_calls/outgoing/off-nominal/bob_does_not_exist/<br><br>Change-Id: I9bc9fec227c9f11015e87d46abca91e926af3ffd<br>---<br>M lib/python/asterisk/sipp.py<br>M tests/channels/pjsip/basic_calls/outgoing/off-nominal/bob_does_not_exist/test-config.yaml<br>M tests/channels/pjsip/qualify/qualify_timeout/test-config.yaml<br>3 files changed, 14 insertions(+), 4 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/lib/python/asterisk/sipp.py b/lib/python/asterisk/sipp.py<br>index acdb20d..6da3108 100644<br>--- a/lib/python/asterisk/sipp.py<br>+++ b/lib/python/asterisk/sipp.py<br>@@ -673,7 +673,17 @@<br> <br> for (key, val) in default_args.items():<br> sipp_args.extend([key, val])<br>- sipp_args.extend(self.positional_args)<br>+<br>+ # The majority of tests do no need re-transmissions enabled. As a<br>+ # matter of fact most tests will fail if sipp re-transmits a message.<br>+ # By default disable all re-transmissions in a scenario unless<br>+ # explicitly told to allow them.<br>+ if '-enable-retrans' in self.positional_args:<br>+ sipp_args.extend(<br>+ [i for i in self.positional_args if i != '-enable-retrans'])<br>+ else:<br>+ sipp_args.append('-nr')<br>+ sipp_args.extend(self.positional_args)<br> <br> LOGGER.info("Executing SIPp scenario: %s" % self.scenario['scenario'])<br> LOGGER.debug(sipp_args)<br>diff --git a/tests/channels/pjsip/basic_calls/outgoing/off-nominal/bob_does_not_exist/test-config.yaml b/tests/channels/pjsip/basic_calls/outgoing/off-nominal/bob_does_not_exist/test-config.yaml<br>index b6909c6..72720c0 100644<br>--- a/tests/channels/pjsip/basic_calls/outgoing/off-nominal/bob_does_not_exist/test-config.yaml<br>+++ b/tests/channels/pjsip/basic_calls/outgoing/off-nominal/bob_does_not_exist/test-config.yaml<br>@@ -33,9 +33,9 @@<br> test-iterations:<br> -<br> scenarios:<br>- - { 'key-args': {'scenario': 'receive.xml', '-i': '127.0.0.1', '-p': '5062', '-s': 'bob-ipv4-udp'} }<br>+ - { 'key-args': {'scenario': 'receive.xml', '-i': '127.0.0.1', '-p': '5062', '-s': 'bob-ipv4-udp'}, 'ordered-args': ['-enable-retrans'] }<br> - { 'key-args': {'scenario': 'receive.xml', '-i': '127.0.0.1', '-p': '5063', '-t': 't1', '-s': 'bob-ipv4-tcp'} }<br>- - { 'target': '[::1]', 'key-args': {'scenario': 'receive.xml', '-i': '[::1]', '-p': '5064', '-s': 'bob-ipv6-udp'} }<br>+ - { 'target': '[::1]', 'key-args': {'scenario': 'receive.xml', '-i': '[::1]', '-p': '5064', '-s': 'bob-ipv6-udp'}, 'ordered-args': ['-enable-retrans'] }<br> - { 'target': '[::1]', 'key-args': {'scenario': 'receive.xml', '-i': '[::1]', '-p': '5065', '-t': 't1', '-s': 'bob-ipv6-tcp'} }<br> <br> originator-config-ipv4-udp:<br>diff --git a/tests/channels/pjsip/qualify/qualify_timeout/test-config.yaml b/tests/channels/pjsip/qualify/qualify_timeout/test-config.yaml<br>index 1252ce6..ad4fb55 100644<br>--- a/tests/channels/pjsip/qualify/qualify_timeout/test-config.yaml<br>+++ b/tests/channels/pjsip/qualify/qualify_timeout/test-config.yaml<br>@@ -19,7 +19,7 @@<br> test-iterations:<br> -<br> scenarios:<br>- - { 'key-args': {'scenario': 'options.xml', '-i': '127.0.0.1', '-d': '10000', '-p': '5061'} }<br>+ - { 'key-args': {'scenario': 'options.xml', '-i': '127.0.0.1', '-d': '10000', '-p': '5061'}, 'ordered-args': ['-enable-retrans'] }<br> <br> ami-config-13.5:<br> -<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/8687">change 8687</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/8687"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: testsuite </div>
<div style="display:none"> Gerrit-Branch: 15 </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I9bc9fec227c9f11015e87d46abca91e926af3ffd </div>
<div style="display:none"> Gerrit-Change-Number: 8687 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Benjamin Keith Ford <bford@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>