[Asterisk-code-review] SIP outbound register tests timeout (testsuite[master])
Anonymous Coward
asteriskteam at digium.com
Mon Oct 5 07:17:36 CDT 2015
Anonymous Coward #1000019 has submitted this change and it was merged.
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(-)
Approvals:
Anonymous Coward #1000019: Verified
Matt Jordan: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, approved
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: merged
Gerrit-Change-Id: Ide5431d1d890cd03e2f685a84b5177b381f40bc5
Gerrit-PatchSet: 1
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>
More information about the asterisk-code-review
mailing list