[Asterisk-code-review] pjsip/statsd/contacts: Sporadically failing due to unexpecte... (testsuite[13])

George Joseph asteriskteam at digium.com
Wed Jun 6 10:05:55 CDT 2018


George Joseph has uploaded a new patch set (#4) to the change originally created by Kevin Harwell. ( https://gerrit.asterisk.org/9048 )

Change subject: pjsip/statsd/contacts: Sporadically failing due to unexpected messages
......................................................................

pjsip/statsd/contacts: Sporadically failing due to unexpected messages

After the pjsip qualify rewrite the contacts statsd test failed fairly
regularly because it was now receiving two messages that it did not receive
before the rewrite. Namely, the messages that occur on shutdown. However,
due to some current shutdown handling in Asterisk these final messages still
may or may not be received by the test.

Unfortunately, the way the statsd tests were written did not allow for optional
messages. Really it only allowed for a strict result set that was not too
configurable.

This patch alleviates the brittleness, and fixes the test, by creating
suitable condition based message handling and matching routines that the test
can now use for optional messages received.

An attempt was made to generically write the message matching routines in hopes
that other future event listeners and handlers could take advantage of it.

Change-Id: Iaae769c7a4fe2dcac4865eb7dc4e5b6a1b25900b
---
A lib/python/asterisk/matcher.py
A lib/python/asterisk/matcher_listener.py
M lib/python/asterisk/pluggable_modules.py
A lib/python/asterisk/self_test/test2_matcher.py
D lib/python/mockd.py
M self_test
M tests/channels/pjsip/statsd/contacts/test-config.yaml
M tests/channels/pjsip/statsd/registrations/test-config.yaml
8 files changed, 775 insertions(+), 188 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/48/9048/4
-- 
To view, visit https://gerrit.asterisk.org/9048
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: testsuite
Gerrit-Branch: 13
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Iaae769c7a4fe2dcac4865eb7dc4e5b6a1b25900b
Gerrit-Change-Number: 9048
Gerrit-PatchSet: 4
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180606/095811a2/attachment.html>


More information about the asterisk-code-review mailing list