Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 4D7BF200C29 for ; Tue, 28 Feb 2017 17:05:03 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 4BF2E160B7C; Tue, 28 Feb 2017 16:05:03 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 47217160B6A for ; Tue, 28 Feb 2017 17:05:02 +0100 (CET) Received: (qmail 94464 invoked by uid 500); 28 Feb 2017 16:05:01 -0000 Mailing-List: contact commits-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@qpid.apache.org Delivered-To: mailing list commits@qpid.apache.org Received: (qmail 94455 invoked by uid 99); 28 Feb 2017 16:05:01 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Feb 2017 16:05:01 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 4EC41DFCA1; Tue, 28 Feb 2017 16:05:01 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: kpvdr@apache.org To: commits@qpid.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: qpid-interop-test git commit: QPIDIT-51: Added --broker-type parameter to test command-line args, if used will not test broker for connection properties Date: Tue, 28 Feb 2017 16:05:01 +0000 (UTC) archived-at: Tue, 28 Feb 2017 16:05:03 -0000 Repository: qpid-interop-test Updated Branches: refs/heads/master daf0c0a7e -> 83fc550d9 QPIDIT-51: Added --broker-type parameter to test command-line args, if used will not test broker for connection properties Project: http://git-wip-us.apache.org/repos/asf/qpid-interop-test/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-interop-test/commit/83fc550d Tree: http://git-wip-us.apache.org/repos/asf/qpid-interop-test/tree/83fc550d Diff: http://git-wip-us.apache.org/repos/asf/qpid-interop-test/diff/83fc550d Branch: refs/heads/master Commit: 83fc550d97f966a739ab915a07285b88b5914466 Parents: daf0c0a Author: Kim van der Riet Authored: Tue Feb 28 11:04:45 2017 -0500 Committer: Kim van der Riet Committed: Tue Feb 28 11:04:45 2017 -0500 ---------------------------------------------------------------------- .../amqp_large_content_test.py | 41 +++++++++++-------- src/python/qpid_interop_test/amqp_types_test.py | 42 +++++++++++-------- .../qpid_interop_test/jms_hdrs_props_test.py | 43 ++++++++++++-------- .../qpid_interop_test/jms_messages_test.py | 41 +++++++++++-------- 4 files changed, 102 insertions(+), 65 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-interop-test/blob/83fc550d/src/python/qpid_interop_test/amqp_large_content_test.py ---------------------------------------------------------------------- diff --git a/src/python/qpid_interop_test/amqp_large_content_test.py b/src/python/qpid_interop_test/amqp_large_content_test.py index 1aaf5f3..7bc97cf 100755 --- a/src/python/qpid_interop_test/amqp_large_content_test.py +++ b/src/python/qpid_interop_test/amqp_large_content_test.py @@ -186,6 +186,9 @@ class TestOptions(object): help='Node from which test suite will receive messages.') parser.add_argument('--no-skip', action='store_true', help='Do not skip tests that are excluded by default for reasons of a known bug') + parser.add_argument('--broker-type', action='store', metavar='BROKER_NAME', + help='Disable test of broker type (using connection properties) by specifying the broker' + + ' name, or "None".') type_group = parser.add_mutually_exclusive_group() type_group.add_argument('--include-type', action='append', metavar='AMQP-TYPE', help='Name of AMQP type to include. Supported types:\n%s' % @@ -244,23 +247,29 @@ if __name__ == '__main__': print 'No such shim: "%s". Use --help for valid shims' % shim sys.exit(1) # Errors or failures present - # Connect to broker to find broker type - CONNECTION_PROPS = qpid_interop_test.broker_properties.get_broker_properties(ARGS.sender) - if CONNECTION_PROPS is None: - print 'WARNING: Unable to get connection properties - unknown broker' - BROKER = 'unknown' + # Connect to broker to find broker type, or use --broker-type param if present + if ARGS.broker_type is not None: + if ARGS.broker_type == 'None': + BROKER = None + else: + BROKER = ARGS.broker_type else: - BROKER = CONNECTION_PROPS[symbol(u'product')] if symbol(u'product') in CONNECTION_PROPS \ - else '' - BROKER_VERSION = CONNECTION_PROPS[symbol(u'version')] if symbol(u'version') in CONNECTION_PROPS \ - else '' - BROKER_PLATFORM = CONNECTION_PROPS[symbol(u'platform')] if symbol(u'platform') in CONNECTION_PROPS \ - else '' - print 'Test Broker: %s v.%s on %s' % (BROKER, BROKER_VERSION, BROKER_PLATFORM) - print - sys.stdout.flush() - if ARGS.no_skip: - BROKER = None # Will cause all tests to run + CONNECTION_PROPS = qpid_interop_test.broker_properties.get_broker_properties(ARGS.sender) + if CONNECTION_PROPS is None: + print 'WARNING: Unable to get connection properties - unknown broker' + BROKER = 'unknown' + else: + BROKER = CONNECTION_PROPS[symbol(u'product')] if symbol(u'product') in CONNECTION_PROPS \ + else '' + BROKER_VERSION = CONNECTION_PROPS[symbol(u'version')] if symbol(u'version') in CONNECTION_PROPS \ + else '' + BROKER_PLATFORM = CONNECTION_PROPS[symbol(u'platform')] if symbol(u'platform') in CONNECTION_PROPS \ + else '' + print 'Test Broker: %s v.%s on %s' % (BROKER, BROKER_VERSION, BROKER_PLATFORM) + print + sys.stdout.flush() + if ARGS.no_skip: + BROKER = None # Will cause all tests to run TYPES = AmqpVariableSizeTypes().get_types(ARGS) http://git-wip-us.apache.org/repos/asf/qpid-interop-test/blob/83fc550d/src/python/qpid_interop_test/amqp_types_test.py ---------------------------------------------------------------------- diff --git a/src/python/qpid_interop_test/amqp_types_test.py b/src/python/qpid_interop_test/amqp_types_test.py index 6b6f9fb..c6c8287 100755 --- a/src/python/qpid_interop_test/amqp_types_test.py +++ b/src/python/qpid_interop_test/amqp_types_test.py @@ -416,6 +416,9 @@ class TestOptions(object): help='Node from which test suite will receive messages.') parser.add_argument('--no-skip', action='store_true', help='Do not skip tests that are excluded by default for reasons of a known bug') + parser.add_argument('--broker-type', action='store', metavar='BROKER_NAME', + help='Disable test of broker type (using connection properties) by specifying the broker' + + ' name, or "None".') type_group = parser.add_mutually_exclusive_group() type_group.add_argument('--include-type', action='append', metavar='AMQP-TYPE', help='Name of AMQP type to include. Supported types:\n%s' % @@ -489,24 +492,29 @@ if __name__ == '__main__': print 'No such shim: "%s". Use --help for valid shims' % shim sys.exit(1) # Errors or failures present - # Connect to broker to find broker type - # TODO: Find out why this uses auth - CONNECTION_PROPS = qpid_interop_test.broker_properties.get_broker_properties(ARGS.sender) - if CONNECTION_PROPS is None: - print 'WARNING: Unable to get connection properties - unknown broker' - BROKER = 'unknown' + # Connect to broker to find broker type, or use --broker-type param if present + if ARGS.broker_type is not None: + if ARGS.broker_type == 'None': + BROKER = None + else: + BROKER = ARGS.broker_type else: - BROKER = CONNECTION_PROPS[symbol(u'product')] if symbol(u'product') in CONNECTION_PROPS \ - else '' - BROKER_VERSION = CONNECTION_PROPS[symbol(u'version')] if symbol(u'version') in CONNECTION_PROPS \ - else '' - BROKER_PLATFORM = CONNECTION_PROPS[symbol(u'platform')] if symbol(u'platform') in CONNECTION_PROPS \ - else '' - print 'Test Broker: %s v.%s on %s' % (BROKER, BROKER_VERSION, BROKER_PLATFORM) - print - sys.stdout.flush() - if ARGS.no_skip: - BROKER = None # Will cause all tests to run + CONNECTION_PROPS = qpid_interop_test.broker_properties.get_broker_properties(ARGS.sender) + if CONNECTION_PROPS is None: + print 'WARNING: Unable to get connection properties - unknown broker' + BROKER = 'unknown' + else: + BROKER = CONNECTION_PROPS[symbol(u'product')] if symbol(u'product') in CONNECTION_PROPS \ + else '' + BROKER_VERSION = CONNECTION_PROPS[symbol(u'version')] if symbol(u'version') in CONNECTION_PROPS \ + else '' + BROKER_PLATFORM = CONNECTION_PROPS[symbol(u'platform')] if symbol(u'platform') in CONNECTION_PROPS \ + else '' + print 'Test Broker: %s v.%s on %s' % (BROKER, BROKER_VERSION, BROKER_PLATFORM) + print + sys.stdout.flush() + if ARGS.no_skip: + BROKER = None # Will cause all tests to run TYPES = AmqpPrimitiveTypes().get_types(ARGS) http://git-wip-us.apache.org/repos/asf/qpid-interop-test/blob/83fc550d/src/python/qpid_interop_test/jms_hdrs_props_test.py ---------------------------------------------------------------------- diff --git a/src/python/qpid_interop_test/jms_hdrs_props_test.py b/src/python/qpid_interop_test/jms_hdrs_props_test.py index 61103a8..0424451 100755 --- a/src/python/qpid_interop_test/jms_hdrs_props_test.py +++ b/src/python/qpid_interop_test/jms_hdrs_props_test.py @@ -307,6 +307,8 @@ class JmsMessageHdrsPropsTestCase(unittest.TestCase): else: self.fail('Return value list needs 3 items, found %d items: %s' % (len(return_list), str(return_list))) + else: + self.fail('Return tuple needs 2 items, found %d items: %s' % (len(receive_obj), str(receive_obj))) else: self.fail(str(receive_obj)) @@ -600,6 +602,9 @@ class TestOptions(object): help='Node from which test suite will receive messages.') parser.add_argument('--no-skip', action='store_true', help='Do not skip tests that are excluded by default for reasons of a known bug') + parser.add_argument('--broker-type', action='store', metavar='BROKER_NAME', + help='Disable test of broker type (using connection properties) by specifying the broker' + + ' name, or "None".') type_group = parser.add_mutually_exclusive_group() type_group.add_argument('--include-type', action='append', metavar='JMS_MESSAGE-TYPE', help='Name of AMQP type to include. Supported types:\n%s' % @@ -664,23 +669,29 @@ if __name__ == '__main__': print 'No such shim: "%s". Use --help for valid shims' % shim sys.exit(1) # Errors or failures present - # Connect to broker to find broker type - CONNECTION_PROPS = qpid_interop_test.broker_properties.get_broker_properties(ARGS.sender) - if CONNECTION_PROPS is None: - print 'WARNING: Unable to get connection properties - unknown broker' - BROKER = 'unknown' + # Connect to broker to find broker type, or use --broker-type param if present + if ARGS.broker_type is not None: + if ARGS.broker_type == 'None': + BROKER = None + else: + BROKER = ARGS.broker_type else: - BROKER = CONNECTION_PROPS[symbol(u'product')] if symbol(u'product') in CONNECTION_PROPS \ - else '' - BROKER_VERSION = CONNECTION_PROPS[symbol(u'version')] if symbol(u'version') in CONNECTION_PROPS \ - else '' - BROKER_PLATFORM = CONNECTION_PROPS[symbol(u'platform')] if symbol(u'platform') in CONNECTION_PROPS \ - else '' - print 'Test Broker: %s v.%s on %s' % (BROKER, BROKER_VERSION, BROKER_PLATFORM) - print - sys.stdout.flush() - if ARGS.no_skip: - BROKER = None # Will cause all tests to run + CONNECTION_PROPS = qpid_interop_test.broker_properties.get_broker_properties(ARGS.sender) + if CONNECTION_PROPS is None: + print 'WARNING: Unable to get connection properties - unknown broker' + BROKER = 'unknown' + else: + BROKER = CONNECTION_PROPS[symbol(u'product')] if symbol(u'product') in CONNECTION_PROPS \ + else '' + BROKER_VERSION = CONNECTION_PROPS[symbol(u'version')] if symbol(u'version') in CONNECTION_PROPS \ + else '' + BROKER_PLATFORM = CONNECTION_PROPS[symbol(u'platform')] if symbol(u'platform') in CONNECTION_PROPS \ + else '' + print 'Test Broker: %s v.%s on %s' % (BROKER, BROKER_VERSION, BROKER_PLATFORM) + print + sys.stdout.flush() + if ARGS.no_skip: + BROKER = None # Will cause all tests to run TYPES = JmsMessageTypes().get_types(ARGS) http://git-wip-us.apache.org/repos/asf/qpid-interop-test/blob/83fc550d/src/python/qpid_interop_test/jms_messages_test.py ---------------------------------------------------------------------- diff --git a/src/python/qpid_interop_test/jms_messages_test.py b/src/python/qpid_interop_test/jms_messages_test.py index 5b76aef..2e22267 100755 --- a/src/python/qpid_interop_test/jms_messages_test.py +++ b/src/python/qpid_interop_test/jms_messages_test.py @@ -311,6 +311,9 @@ class TestOptions(object): help='Node from which test suite will receive messages.') parser.add_argument('--no-skip', action='store_true', help='Do not skip tests that are excluded by default for reasons of a known bug') + parser.add_argument('--broker-type', action='store', metavar='BROKER_NAME', + help='Disable test of broker type (using connection properties) by specifying the broker' + + ' name, or "None".') type_group = parser.add_mutually_exclusive_group() type_group.add_argument('--include-type', action='append', metavar='JMS_MESSAGE-TYPE', help='Name of AMQP type to include. Supported types:\n%s' % @@ -374,23 +377,29 @@ if __name__ == '__main__': print 'No such shim: "%s". Use --help for valid shims' % shim sys.exit(1) # Errors or failures present - # Connect to broker to find broker type - CONNECTION_PROPS = qpid_interop_test.broker_properties.get_broker_properties(ARGS.sender) - if CONNECTION_PROPS is None: - print 'WARNING: Unable to get connection properties - unknown broker' - BROKER = 'unknown' + # Connect to broker to find broker type, or use --broker-type param if present + if ARGS.broker_type is not None: + if ARGS.broker_type == 'None': + BROKER = None + else: + BROKER = ARGS.broker_type else: - BROKER = CONNECTION_PROPS[symbol(u'product')] if symbol(u'product') in CONNECTION_PROPS \ - else '' - BROKER_VERSION = CONNECTION_PROPS[symbol(u'version')] if symbol(u'version') in CONNECTION_PROPS \ - else '' - BROKER_PLATFORM = CONNECTION_PROPS[symbol(u'platform')] if symbol(u'platform') in CONNECTION_PROPS \ - else '' - print 'Test Broker: %s v.%s on %s' % (BROKER, BROKER_VERSION, BROKER_PLATFORM) - print - sys.stdout.flush() - if ARGS.no_skip: - BROKER = None # Will cause all tests to run + CONNECTION_PROPS = qpid_interop_test.broker_properties.get_broker_properties(ARGS.sender) + if CONNECTION_PROPS is None: + print 'WARNING: Unable to get connection properties - unknown broker' + BROKER = 'unknown' + else: + BROKER = CONNECTION_PROPS[symbol(u'product')] if symbol(u'product') in CONNECTION_PROPS \ + else '' + BROKER_VERSION = CONNECTION_PROPS[symbol(u'version')] if symbol(u'version') in CONNECTION_PROPS \ + else '' + BROKER_PLATFORM = CONNECTION_PROPS[symbol(u'platform')] if symbol(u'platform') in CONNECTION_PROPS \ + else '' + print 'Test Broker: %s v.%s on %s' % (BROKER, BROKER_VERSION, BROKER_PLATFORM) + print + sys.stdout.flush() + if ARGS.no_skip: + BROKER = None # Will cause all tests to run TYPES = JmsMessageTypes().get_types(ARGS) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org For additional commands, e-mail: commits-help@qpid.apache.org