[asterisk-commits] Testsuite: Fix PJSIP show subscriptions test. (testsuite[master])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jun 17 13:33:12 CDT 2016


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

Change subject: Testsuite: Fix PJSIP show_subscriptions test.
......................................................................


Testsuite: Fix PJSIP show_subscriptions test.

The show_subscriptions test was failing occasionally because at
shutdown, a SUBSCRIPTION_STATE_SET event was being sent with state
TERMINATED for one of the subscriptions. This would fail the test on two
counts:

1) Since a SUBSCRIPTION_STATE_SET event beyond the maximum count was
being received, the test failed because the number of events received
exceeded the expected number.

2) Since the SUBSCRIPTION_STATE_SET event in test-config.yaml had a
requirement that the state be ACTIVE, receiving an event with state
TERMINATED resulted in a failure due to the required state being
incorrect.

The fix for this is to switch the state in the SUBSCRIPTION_STATE_SET
from being a requirement to a condition. This way, only the ACTIVE state
notifications contribute to the count. The TERMINATED states are
completely ignored and have no bearing on the test results.

Change-Id: Ib17daae0763e98fafcfabc7522d2c11a3a365220
---
M tests/channels/pjsip/ami/show_subscriptions/test-config.yaml
1 file changed, 0 insertions(+), 4 deletions(-)

Approvals:
  Scott Griepentrog: Looks good to me, but someone else must approve
  Anonymous Coward #1000019: Verified
  Joshua Colp: Looks good to me, approved



diff --git a/tests/channels/pjsip/ami/show_subscriptions/test-config.yaml b/tests/channels/pjsip/ami/show_subscriptions/test-config.yaml
index a031ecd..044a845 100644
--- a/tests/channels/pjsip/ami/show_subscriptions/test-config.yaml
+++ b/tests/channels/pjsip/ami/show_subscriptions/test-config.yaml
@@ -41,8 +41,6 @@
                     Event: 'TestEvent'
                     State: 'SUBSCRIPTION_STATE_SET'
                     Endpoint: 'user1'
-            requirements:
-                match:
                     StateText: 'ACTIVE'
             count: 1
     -
@@ -52,8 +50,6 @@
                     Event: 'TestEvent'
                     State: 'SUBSCRIPTION_STATE_SET'
                     Endpoint: 'user2'
-            requirements:
-                match:
                     StateText: 'ACTIVE'
             count: 1
         ami-actions:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib17daae0763e98fafcfabc7522d2c11a3a365220
Gerrit-PatchSet: 1
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Scott Griepentrog <sgriepentrog at digium.com>



More information about the asterisk-commits mailing list