[Asterisk-code-review] SIP outbound register tests timeout (testsuite[master])
Kevin Harwell
asteriskteam at digium.com
Fri Oct 2 18:10:56 CDT 2015
Kevin Harwell has uploaded a new change for review.
https://gerrit.asterisk.org/1367
Change subject: SIP outbound register tests timeout
......................................................................
SIP outbound register tests timeout
The SIP outbound register and re-register tests wait for the reactor to
time out as a way to stop the tests. Fixed up both tests to stop running
after receiving several registration messages instead of relying on the
reactor timeout.
Change-Id: Ide5431d1d890cd03e2f685a84b5177b381f40bc5
---
M tests/channels/SIP/outbound_register_from/sipp/register.xml
M tests/channels/SIP/outbound_reregister_from/sipp/register.xml
2 files changed, 19 insertions(+), 2 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/67/1367/1
diff --git a/tests/channels/SIP/outbound_register_from/sipp/register.xml b/tests/channels/SIP/outbound_register_from/sipp/register.xml
index eee6a85..080bf15 100644
--- a/tests/channels/SIP/outbound_register_from/sipp/register.xml
+++ b/tests/channels/SIP/outbound_register_from/sipp/register.xml
@@ -6,6 +6,7 @@
<!-- Store the tag of the first register -->
<recv request="REGISTER">
<action>
+ <assign assign_to="count" value="0" />
<ereg regexp="tag=.*" search_in="hdr" header="From:" assign_to="firsttag" />
<log message="Received First REGISTER [$firsttag]" />
</action>
@@ -23,6 +24,8 @@
<!-- Did tag match first one? -->
<nop hide="true">
<action>
+ <add assign_to="count" value="1" />
+ <test assign_to="done" compare="equal" variable="count" value="2" />
<strcmp assign_to="match" variable="fromtag" variable2="firsttag" />
<test assign_to="wrongtag" compare="not_equal" variable="match" value="0" />
</action>
@@ -36,10 +39,12 @@
</action>
</nop>
+ <!-- Stop test after a few registers have been received -->
+ <nop next="end" test="done" hide="true"/>
<!-- And just keep doing that until core breach -->
<nop hide="true" next="loop" />
-
+ <label id="end" />
<!-- definition of the response time repartition table (unit is ms) -->
<ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
diff --git a/tests/channels/SIP/outbound_reregister_from/sipp/register.xml b/tests/channels/SIP/outbound_reregister_from/sipp/register.xml
index c51c312..f704644 100644
--- a/tests/channels/SIP/outbound_reregister_from/sipp/register.xml
+++ b/tests/channels/SIP/outbound_reregister_from/sipp/register.xml
@@ -6,6 +6,7 @@
<!-- Store the tag of the first register -->
<recv request="REGISTER">
<action>
+ <assign assign_to="count" value="0" />
<ereg regexp="tag=.*" search_in="hdr" header="From:" assign_to="firsttag" />
<log message="Received First REGISTER [$firsttag]" />
</action>
@@ -74,8 +75,19 @@
]]>
</send>
- <nop hide="true" next="badauth" />
+ <nop hide="true">
+ <action>
+ <add assign_to="count" value="1" />
+ <test assign_to="done" compare="equal" variable="count" value="4" />
+ </action>
+ </nop>
+
+ <!-- Stop test after a few registers have been received -->
+ <nop next="end" test="done" hide="true" />
+
+ <nop hide="true" next="badauth" />
+ <label id="end" />
<!-- definition of the response time repartition table (unit is ms) -->
<ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
--
To view, visit https://gerrit.asterisk.org/1367
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ide5431d1d890cd03e2f685a84b5177b381f40bc5
Gerrit-PatchSet: 1
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>
More information about the asterisk-code-review
mailing list