[Asterisk-code-review] Testsuite: Fix PJSIP show subscriptions test. (testsuite[master])

Mark Michelson asteriskteam at digium.com
Fri Jun 17 08:45:29 CDT 2016


Mark Michelson has uploaded a new change for review.

  https://gerrit.asterisk.org/3037

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(-)


  git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/37/3037/1

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: newchange
Gerrit-Change-Id: Ib17daae0763e98fafcfabc7522d2c11a3a365220
Gerrit-PatchSet: 1
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Mark Michelson <mmichelson at digium.com>



More information about the asterisk-code-review mailing list