qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kp...@apache.org
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 GMT
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 <kpvdr@apache.org>
Authored: Tue Feb 28 11:04:45 2017 -0500
Committer: Kim van der Riet <kpvdr@apache.org>
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 '<product not found>'
-        BROKER_VERSION = CONNECTION_PROPS[symbol(u'version')] if symbol(u'version') in CONNECTION_PROPS
\
-                         else '<version not found>'
-        BROKER_PLATFORM = CONNECTION_PROPS[symbol(u'platform')] if symbol(u'platform') in
CONNECTION_PROPS \
-                          else '<platform not found>'
-        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 '<product not found>'
+            BROKER_VERSION = CONNECTION_PROPS[symbol(u'version')] if symbol(u'version') in
CONNECTION_PROPS \
+                             else '<version not found>'
+            BROKER_PLATFORM = CONNECTION_PROPS[symbol(u'platform')] if symbol(u'platform')
in CONNECTION_PROPS \
+                              else '<platform not found>'
+            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 '<product not found>'
-        BROKER_VERSION = CONNECTION_PROPS[symbol(u'version')] if symbol(u'version') in CONNECTION_PROPS
\
-                         else '<version not found>'
-        BROKER_PLATFORM = CONNECTION_PROPS[symbol(u'platform')] if symbol(u'platform') in
CONNECTION_PROPS \
-                          else '<platform not found>'
-        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 '<product not found>'
+            BROKER_VERSION = CONNECTION_PROPS[symbol(u'version')] if symbol(u'version') in
CONNECTION_PROPS \
+                             else '<version not found>'
+            BROKER_PLATFORM = CONNECTION_PROPS[symbol(u'platform')] if symbol(u'platform')
in CONNECTION_PROPS \
+                              else '<platform not found>'
+            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 '<product not found>'
-        BROKER_VERSION = CONNECTION_PROPS[symbol(u'version')] if symbol(u'version') in CONNECTION_PROPS
\
-                         else '<version not found>'
-        BROKER_PLATFORM = CONNECTION_PROPS[symbol(u'platform')] if symbol(u'platform') in
CONNECTION_PROPS \
-                          else '<platform not found>'
-        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 '<product not found>'
+            BROKER_VERSION = CONNECTION_PROPS[symbol(u'version')] if symbol(u'version') in
CONNECTION_PROPS \
+                             else '<version not found>'
+            BROKER_PLATFORM = CONNECTION_PROPS[symbol(u'platform')] if symbol(u'platform')
in CONNECTION_PROPS \
+                              else '<platform not found>'
+            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 '<product not found>'
-        BROKER_VERSION = CONNECTION_PROPS[symbol(u'version')] if symbol(u'version') in CONNECTION_PROPS
\
-                         else '<version not found>'
-        BROKER_PLATFORM = CONNECTION_PROPS[symbol(u'platform')] if symbol(u'platform') in
CONNECTION_PROPS \
-                          else '<platform not found>'
-        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 '<product not found>'
+            BROKER_VERSION = CONNECTION_PROPS[symbol(u'version')] if symbol(u'version') in
CONNECTION_PROPS \
+                             else '<version not found>'
+            BROKER_PLATFORM = CONNECTION_PROPS[symbol(u'platform')] if symbol(u'platform')
in CONNECTION_PROPS \
+                              else '<platform not found>'
+            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


Mime
View raw message