[asterisk-commits] rls test: Return if the packet index exceeds the expected li... (testsuite[master])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Nov 22 11:57:58 CST 2015


Anonymous Coward #1000019 has submitted this change and it was merged.

Change subject: rls_test: Return if the packet index exceeds the expected list size
......................................................................


rls_test: Return if the packet index exceeds the expected list size

The RLS tests will currently fail if the number of received packets exceeds
the expected number of packets. However, the routine that does this check
does not return, which causes an exception to occur when the expected packet
list is indexed into. This patch simply bails out of the routine, saving us
from a spurious exception.

Change-Id: Id8d9c2b6128740a6cb11a22f2c5e0543b96549d9
---
M tests/channels/pjsip/subscriptions/rls/rls_test.py
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Anonymous Coward #1000019: Verified
  Joshua Colp: Looks good to me, approved



diff --git a/tests/channels/pjsip/subscriptions/rls/rls_test.py b/tests/channels/pjsip/subscriptions/rls/rls_test.py
index b4cadc0..707de37 100755
--- a/tests/channels/pjsip/subscriptions/rls/rls_test.py
+++ b/tests/channels/pjsip/subscriptions/rls/rls_test.py
@@ -195,6 +195,7 @@
                 "Failing test.").format(self.packets_idx,
                                         len(self.packets))
             self.fail_test(message)
+            return
 
         rls_packet = RLSPacket(packet)
         resources = self.packets[self.packets_idx]["resources"]

-- 
To view, visit https://gerrit.asterisk.org/1683
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Id8d9c2b6128740a6cb11a22f2c5e0543b96549d9
Gerrit-PatchSet: 1
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Matt Jordan <mjordan at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>



More information about the asterisk-commits mailing list