[Asterisk-code-review] rtp/strict rtp: Be forgiving for packet count trigger. (testsuite[master])
Richard Mudgett
asteriskteam at digium.com
Thu Oct 19 17:32:36 CDT 2017
Richard Mudgett has uploaded this change for review. ( https://gerrit.asterisk.org/6842
Change subject: rtp/strict_rtp: Be forgiving for packet count trigger.
......................................................................
rtp/strict_rtp: Be forgiving for packet count trigger.
On my test box, the test frequently fails because the RTCPReceived
SentPacket count is not what is expected to trigger the RTP attack stream.
* Use a range of allowed packet counts to trigger the RTP attack stream.
* Added a message to tell how many SentPackets triggered the attack stream
for each AMI connection.
Change-Id: I58b2d5938cdcd165a4954429c70de34fb1184cd5
---
M tests/rtp/strict_rtp/strict_rtp.py
1 file changed, 5 insertions(+), 1 deletion(-)
git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/42/6842/1
diff --git a/tests/rtp/strict_rtp/strict_rtp.py b/tests/rtp/strict_rtp/strict_rtp.py
index a782152..57974b5 100644
--- a/tests/rtp/strict_rtp/strict_rtp.py
+++ b/tests/rtp/strict_rtp/strict_rtp.py
@@ -75,8 +75,12 @@
ami The AMI protocol instance
event The Newchannel event
"""
- if event['sentpackets'] != '250':
+ if int(event['sentpackets']) < 240 or 260 < int(event['sentpackets']):
return
+ LOGGER.info("AMI " +
+ str(ami.id) +
+ ": Triggered on AMI RTCPReceived event with SentPackets: " +
+ event['sentpackets'])
self.test_object.set_passed(True)
protocol = StrictRtpTester.NoAnswerProtocol(self.test_object)
--
To view, visit https://gerrit.asterisk.org/6842
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I58b2d5938cdcd165a4954429c70de34fb1184cd5
Gerrit-Change-Number: 6842
Gerrit-PatchSet: 1
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171019/a2043e96/attachment.html>
More information about the asterisk-code-review
mailing list