Merge "Subscription Confirmation Support-1"

This commit is contained in:
Jenkins 2016-08-18 07:51:37 +00:00 committed by Gerrit Code Review
commit 0ed2a72e01
2 changed files with 12 additions and 2 deletions

View File

@ -115,10 +115,15 @@ class TestSubscriptions(base.BaseV2MessagingTest):
if not test.call_until_true(
lambda: self.list_messages(sub_queue)[1]['messages'], 10, 1):
self.fail("Couldn't get messages")
messages = self.list_messages(sub_queue)
_, body = self.list_messages(sub_queue)
expected = message_body['messages'][0]
expected['queue_name'] = self.queue_name
self.assertEqual(expected, messages[1]['messages'][0]['body'])
expected['Message_Type'] = 'Notification'
for message in body['messages']:
# There are two message in the queue. One is the confirm message,
# the other one is the notification.
if message['body']['Message_Type'] == 'Notification':
self.assertEqual(expected, message['body'])
@classmethod
def resource_cleanup(cls):

View File

@ -17,6 +17,7 @@ import uuid
from tempest import config
from tempest.lib.common.utils import data_utils
from tempest.lib import decorators
from tempest.lib import exceptions as lib_exc
from tempest import test
@ -45,6 +46,10 @@ class TestSubscriptionsNegative(base.BaseV2MessagingTest):
# Create Subscriptions
# TODO(wangxiyuan): Now the subscription confirmation feature only support
# mongoDB backend. Skip this test until the feature support the redis
# backend. Then rewrite it.
@decorators.skip_because(bug='1609596')
@test.attr(type=['negative'])
@test.idempotent_id('fe0d8ec1-1a64-4490-8869-e821b2252e74')
def test_create_subscriptions_with_duplicate_subscriber(self):