Repository: qpid-interop-test
Updated Branches:
  refs/heads/master ec0e4bbc6 -> 1c5a913ba


QPIDIT-36: Changed test harnesses so that send and receive shims work 
concurrently on different threads. The sender is started prior to the receiver 
for allowing operation against brokerless dispatch router configurations.


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/1c5a913b
Tree: http://git-wip-us.apache.org/repos/asf/qpid-interop-test/tree/1c5a913b
Diff: http://git-wip-us.apache.org/repos/asf/qpid-interop-test/diff/1c5a913b

Branch: refs/heads/master
Commit: 1c5a913babb5a391b568cc0ebbff2e95dcb074fc
Parents: ec0e4bb
Author: Kim van der Riet <kp...@apache.org>
Authored: Fri Sep 16 09:45:23 2016 -0400
Committer: Kim van der Riet <kp...@apache.org>
Committed: Fri Sep 16 09:45:23 2016 -0400

----------------------------------------------------------------------
 .../qpid_interop_test/shim/JmsSenderShim.java   |   1 +
 .../src/qpidit/shim/AmqpReceiver.cpp            |   5 +-
 .../src/qpidit/shim/JmsReceiver.cpp             |  88 ++++---
 .../src/qpidit/shim/JmsSender.cpp               |   4 +-
 shims/qpid-proton-python/src/JmsReceiverShim.py |   9 +
 shims/qpid-proton-python/src/JmsSenderShim.py   |   9 +
 .../qpid-interop-test/jms/jms_message_tests.py  | 258 ++++++-------------
 src/python/qpid-interop-test/shims.py           | 178 +++++++++++++
 .../types/simple_type_tests.py                  | 196 ++++----------
 9 files changed, 385 insertions(+), 363 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-interop-test/blob/1c5a913b/shims/qpid-jms/src/main/java/org/apache/qpid/qpid_interop_test/shim/JmsSenderShim.java
----------------------------------------------------------------------
diff --git 
a/shims/qpid-jms/src/main/java/org/apache/qpid/qpid_interop_test/shim/JmsSenderShim.java
 
b/shims/qpid-jms/src/main/java/org/apache/qpid/qpid_interop_test/shim/JmsSenderShim.java
index 78bedfc..d32147d 100644
--- 
a/shims/qpid-jms/src/main/java/org/apache/qpid/qpid_interop_test/shim/JmsSenderShim.java
+++ 
b/shims/qpid-jms/src/main/java/org/apache/qpid/qpid_interop_test/shim/JmsSenderShim.java
@@ -83,6 +83,7 @@ public class JmsSenderShim {
 
         if (testParamsList.size() != 3) {
             System.err.println("ERROR: Incorrect number of JSON parameters: 
Expected 3, got " + Integer.toString(testParamsList.size()));
+            System.err.println("  JSON parameters found: \"" + testParamsList 
+ "\"");
             System.exit(1);
         }
         JsonObject testValuesMap = testParamsList.getJsonObject(0);

http://git-wip-us.apache.org/repos/asf/qpid-interop-test/blob/1c5a913b/shims/qpid-proton-cpp/src/qpidit/shim/AmqpReceiver.cpp
----------------------------------------------------------------------
diff --git a/shims/qpid-proton-cpp/src/qpidit/shim/AmqpReceiver.cpp 
b/shims/qpid-proton-cpp/src/qpidit/shim/AmqpReceiver.cpp
index 7680a77..e50ffb6 100644
--- a/shims/qpid-proton-cpp/src/qpidit/shim/AmqpReceiver.cpp
+++ b/shims/qpid-proton-cpp/src/qpidit/shim/AmqpReceiver.cpp
@@ -52,7 +52,7 @@ namespace qpidit
         }
 
         void AmqpReceiver::on_container_start(proton::container &c) {
-            /*_receiver = */c.open_receiver(_brokerUrl);
+            c.open_receiver(_brokerUrl);
         }
 
         void AmqpReceiver::on_message(proton::delivery &d, proton::message &m) 
{
@@ -280,7 +280,8 @@ int main(int argc, char** argv) {
         proton::default_container(receiver).run();
 
         std::cout << argv[3] << std::endl;
-        std::cout << receiver.getReceivedValueList();
+        Json::FastWriter fw;
+        std::cout << fw.write(receiver.getReceivedValueList());
     } catch (const std::exception& e) {
         std::cerr << "AmqpReceiver error: " << e.what() << std::endl;
         exit(-1);

http://git-wip-us.apache.org/repos/asf/qpid-interop-test/blob/1c5a913b/shims/qpid-proton-cpp/src/qpidit/shim/JmsReceiver.cpp
----------------------------------------------------------------------
diff --git a/shims/qpid-proton-cpp/src/qpidit/shim/JmsReceiver.cpp 
b/shims/qpid-proton-cpp/src/qpidit/shim/JmsReceiver.cpp
index c1396a4..c2ab893 100644
--- a/shims/qpid-proton-cpp/src/qpidit/shim/JmsReceiver.cpp
+++ b/shims/qpid-proton-cpp/src/qpidit/shim/JmsReceiver.cpp
@@ -75,46 +75,52 @@ namespace qpidit
         }
 
         void JmsReceiver::on_message(proton::delivery &d, proton::message &m) {
-            if (_received < _expected) {
-                switch 
(m.message_annotations().get(proton::symbol("x-opt-jms-msg-type")).get<int8_t>())
 {
-                case JMS_MESSAGE_TYPE:
-                    receiveJmsMessage(m);
-                    break;
-                case JMS_OBJECTMESSAGE_TYPE:
-                    receiveJmsObjectMessage(m);
-                    break;
-                case JMS_MAPMESSAGE_TYPE:
-                    receiveJmsMapMessage(m);
-                    break;
-                case JMS_BYTESMESSAGE_TYPE:
-                    receiveJmsBytesMessage(m);
-                    break;
-                case JMS_STREAMMESSAGE_TYPE:
-                    receiveJmsStreamMessage(m);
-                    break;
-                case JMS_TEXTMESSAGE_TYPE:
-                    receiveJmsTextMessage(m);
-                    break;
-                default:;
-                    // TODO: handle error - no known JMS message type
-                }
-
-                processMessageHeaders(m);
-                processMessageProperties(m);
-
-                std::string subType(_subTypeList[_subTypeIndex]);
-                // Increment the subtype if the required number of messages 
have been received
-                if (_receivedSubTypeList.size() >= 
_testNumberMap[subType].asInt() &&
-                                _subTypeIndex < _testNumberMap.size()) {
-                    _receivedValueMap[subType] = _receivedSubTypeList;
-                    _receivedSubTypeList.clear();
-                    ++_subTypeIndex;
-                }
-                _received++;
-                if (_received >= _expected) {
-                    d.receiver().close();
-                    d.connection().close();
+            try {
+                if (_received < _expected) {
+                    switch 
(m.message_annotations().get(proton::symbol("x-opt-jms-msg-type")).get<int8_t>())
 {
+                    case JMS_MESSAGE_TYPE:
+                        receiveJmsMessage(m);
+                        break;
+                    case JMS_OBJECTMESSAGE_TYPE:
+                        receiveJmsObjectMessage(m);
+                        break;
+                    case JMS_MAPMESSAGE_TYPE:
+                        receiveJmsMapMessage(m);
+                        break;
+                    case JMS_BYTESMESSAGE_TYPE:
+                        receiveJmsBytesMessage(m);
+                        break;
+                    case JMS_STREAMMESSAGE_TYPE:
+                        receiveJmsStreamMessage(m);
+                        break;
+                    case JMS_TEXTMESSAGE_TYPE:
+                        receiveJmsTextMessage(m);
+                        break;
+                    default:;
+                        // TODO: handle error - no known JMS message type
+                    }
+
+                    processMessageHeaders(m);
+                    processMessageProperties(m);
+
+                    std::string subType(_subTypeList[_subTypeIndex]);
+                    // Increment the subtype if the required number of 
messages have been received
+                    if (_receivedSubTypeList.size() >= 
_testNumberMap[subType].asInt() &&
+                                    _subTypeIndex < _testNumberMap.size()) {
+                        _receivedValueMap[subType] = _receivedSubTypeList;
+                        _receivedSubTypeList.clear();
+                        ++_subTypeIndex;
+                    }
+                    _received++;
+                    if (_received >= _expected) {
+                        d.receiver().close();
+                        d.connection().close();
+                    }
                 }
+            } catch (const std::exception&) {
+                d.receiver().close();
+                d.connection().close();
+                throw;
             }
         }
 
@@ -415,8 +421,6 @@ int main(int argc, char** argv) {
         std::cout << fw.write(receiver.getReceivedHeadersMap());
         std::cout << fw.write(receiver.getReceivedPropertiesMap());
     } catch (const std::exception& e) {
-        std::cerr << "JmsReceiver error: " << e.what() << std::endl;
-        exit(1);
+        std::cout << "JmsReceiver error: " << e.what() << std::endl;
     }
-    exit(0);
 }

http://git-wip-us.apache.org/repos/asf/qpid-interop-test/blob/1c5a913b/shims/qpid-proton-cpp/src/qpidit/shim/JmsSender.cpp
----------------------------------------------------------------------
diff --git a/shims/qpid-proton-cpp/src/qpidit/shim/JmsSender.cpp 
b/shims/qpid-proton-cpp/src/qpidit/shim/JmsSender.cpp
index 5147cb3..6576732 100644
--- a/shims/qpid-proton-cpp/src/qpidit/shim/JmsSender.cpp
+++ b/shims/qpid-proton-cpp/src/qpidit/shim/JmsSender.cpp
@@ -482,8 +482,6 @@ int main(int argc, char** argv) {
         qpidit::shim::JmsSender sender(oss.str(), argv[3], testParams);
         proton::default_container(sender).run();
     } catch (const std::exception& e) {
-        std::cerr << "JmsSender error: " << e.what() << std::endl;
-        exit(1);
+        std::cout << "JmsSender error: " << e.what() << std::endl;
     }
-    exit(0);
 }

http://git-wip-us.apache.org/repos/asf/qpid-interop-test/blob/1c5a913b/shims/qpid-proton-python/src/JmsReceiverShim.py
----------------------------------------------------------------------
diff --git a/shims/qpid-proton-python/src/JmsReceiverShim.py 
b/shims/qpid-proton-python/src/JmsReceiverShim.py
index 7801d3f..d23c208 100755
--- a/shims/qpid-proton-python/src/JmsReceiverShim.py
+++ b/shims/qpid-proton-python/src/JmsReceiverShim.py
@@ -95,6 +95,15 @@ class JmsReceiverShim(MessagingHandler):
                 event.receiver.close()
                 event.connection.close()
 
+    def on_connection_error(self, event):
+        print 'JmsReceiverShim.on_connection_error'
+
+    def on_session_error(self, event):
+        print 'JmsReceiverShim.on_session_error'
+
+    def on_link_error(self, event):
+        print 'JmsReceiverShim.on_link_error'
+
     def _handle_message(self, message):
         """Handles the analysis of a received message"""
         if self.jms_msg_type == 'JMS_MESSAGE_TYPE':

http://git-wip-us.apache.org/repos/asf/qpid-interop-test/blob/1c5a913b/shims/qpid-proton-python/src/JmsSenderShim.py
----------------------------------------------------------------------
diff --git a/shims/qpid-proton-python/src/JmsSenderShim.py 
b/shims/qpid-proton-python/src/JmsSenderShim.py
index ab5d429..5a1108a 100755
--- a/shims/qpid-proton-python/src/JmsSenderShim.py
+++ b/shims/qpid-proton-python/src/JmsSenderShim.py
@@ -83,6 +83,15 @@ class JmsSenderShim(MessagingHandler):
                 if self._send_test_values(event, sub_type, 
self.test_value_map[sub_type]):
                     return
 
+    def on_connection_error(self, event):
+        print 'JmsSenderShim.on_connection_error'
+
+    def on_session_error(self, event):
+        print 'JmsSenderShim.on_session_error'
+
+    def on_link_error(self, event):
+        print 'JmsSenderShim.on_link_error'
+
     def on_accepted(self, event):
         """Event callback for when a sent message is accepted by the broker"""
         self.confirmed += 1

http://git-wip-us.apache.org/repos/asf/qpid-interop-test/blob/1c5a913b/src/python/qpid-interop-test/jms/jms_message_tests.py
----------------------------------------------------------------------
diff --git a/src/python/qpid-interop-test/jms/jms_message_tests.py 
b/src/python/qpid-interop-test/jms/jms_message_tests.py
index 4311f86..4907872 100755
--- a/src/python/qpid-interop-test/jms/jms_message_tests.py
+++ b/src/python/qpid-interop-test/jms/jms_message_tests.py
@@ -28,13 +28,13 @@ import sys
 import unittest
 
 from itertools import product
-from json import dumps, loads
+from json import dumps
 from os import getenv, path
-from subprocess import check_output, CalledProcessError
 
+import broker_properties
+import shims
 from proton import symbol
 from test_type_map import TestTypeMap
-import broker_properties
 
 
 # TODO: propose a sensible default when installation details are worked out
@@ -42,6 +42,7 @@ QPID_INTEROP_TEST_HOME = getenv('QPID_INTEROP_TEST_HOME')
 if QPID_INTEROP_TEST_HOME is None:
     print 'ERROR: Environment variable QPID_INTEROP_TEST_HOME is not set'
     sys.exit(1)
+MAVEN_REPO_PATH = getenv('MAVEN_REPO_PATH', path.join(getenv('HOME'), '.m2', 
'repository'))
 
 class JmsMessageTypes(TestTypeMap):
     """
@@ -253,43 +254,67 @@ class JmsMessageTypeTestCase(unittest.TestCase):
         """
         queue_name = 'jms.queue.qpid-interop.jms_message_type_tests.%s.%s.%s' 
% (jms_message_type, send_shim.NAME,
                                                                                
  receive_shim.NAME)
-        send_error_text = send_shim.send(broker_addr,
-                                         queue_name,
-                                         jms_message_type,
-                                         dumps([test_values, msg_hdrs, 
msg_props]))
-        if len(send_error_text) > 0:
-            self.fail('Send shim \'%s\':\n%s' % (send_shim.NAME, 
send_error_text))
 
+        # First create a map containing the numbers of expected mesasges for 
each JMS message type
         num_test_values_map = {}
         if len(test_values) > 0:
             for index in test_values.keys():
                 num_test_values_map[index] = len(test_values[index])
+        # Create a map of flags which indicate to the receiver the details of 
some of the messages so that it can
+        # be correctly handled (as these require some prior knowledge)
         flags_map = {}
         if 'JMS_CORRELATIONID_HEADER' in msg_hdrs and 'bytes' in 
msg_hdrs['JMS_CORRELATIONID_HEADER']:
             flags_map['JMS_CORRELATIONID_AS_BYTES'] = True
         if 'JMS_REPLYTO_HEADER' in msg_hdrs and 'topic' in 
msg_hdrs['JMS_REPLYTO_HEADER']:
             flags_map['JMS_REPLYTO_AS_TOPIC'] = True
-        receive_text = receive_shim.receive(broker_addr,
-                                            queue_name,
-                                            jms_message_type,
-                                            dumps([num_test_values_map, 
flags_map]))
-        if isinstance(receive_text, str):
-            self.fail(receive_text)
+        # Start the receiver shim
+        receiver = receive_shim.create_receiver(broker_addr, queue_name, 
jms_message_type,
+                                                dumps([num_test_values_map, 
flags_map]))
+        receiver.start()
+
+        # Start the send shim
+        sender = send_shim.create_sender(broker_addr, queue_name, 
jms_message_type,
+                                         dumps([test_values, msg_hdrs, 
msg_props]))
+        sender.start()
+
+        # Wait for both shims to finish
+        sender.join(shims.THREAD_TIMEOUT)
+        if sender.isAlive():
+            print 'Sender thread %s timed out' % sender.getName()
+        receiver.join(shims.THREAD_TIMEOUT)
+        if receiver.isAlive():
+            print 'Receiver thread %s timed out' % receiver.getName()
+
+        # Process return string from sender
+        send_obj = sender.get_return_object()
+        if send_obj is not None:
+            if isinstance(send_obj, str) and len(send_obj) > 0:
+                self.fail('Send shim \'%s\':\n%s' % (send_shim.NAME, send_obj))
+            else:
+                self.fail('Send shim \'%s\':\n%s' % str(send_obj))
+
+        # Process return string from receiver
+        receive_obj = receiver.get_return_object()
+        if receive_obj is None:
+            self.fail('JmsReceiver shim returned None')
         else:
-            # receive_text is 4-tuple
-            return_jms_message_type, return_test_values, return_msg_hdrs, 
return_msg_props = receive_text
-            self.assertEqual(return_jms_message_type, jms_message_type,
-                             msg='JMS message type error:\n\n    sent:%s\n\n   
 received:%s' % \
-                             (jms_message_type, return_jms_message_type))
-            self.assertEqual(return_test_values, test_values,
-                             msg='JMS message body error:\n\n    sent:%s\n\n   
 received:%s' % \
-                             (test_values, return_test_values))
-            self.assertEqual(return_msg_hdrs, msg_hdrs,
-                             msg='JMS message headers error:\n\n    
sent:%s\n\n    received:%s' % \
-                             (msg_hdrs, return_msg_hdrs))
-            self.assertEqual(return_msg_props, msg_props,
-                             msg='JMS message properties error:\n\n    
sent:%s\n\n    received:%s' % \
-                             (msg_props, return_msg_props))
+            if isinstance(receive_obj, tuple):
+                if len(receive_obj) == 4:
+                    return_jms_message_type, return_test_values, 
return_msg_hdrs, return_msg_props = receive_obj
+                    self.assertEqual(return_jms_message_type, jms_message_type,
+                                     msg='JMS message type error:\n\n    
sent:%s\n\n    received:%s' % \
+                                     (jms_message_type, 
return_jms_message_type))
+                    self.assertEqual(return_test_values, test_values,
+                                     msg='JMS message body error:\n\n    
sent:%s\n\n    received:%s' % \
+                                     (test_values, return_test_values))
+                    self.assertEqual(return_msg_hdrs, msg_hdrs,
+                                     msg='JMS message headers error:\n\n    
sent:%s\n\n    received:%s' % \
+                                     (msg_hdrs, return_msg_hdrs))
+                    self.assertEqual(return_msg_props, msg_props,
+                                     msg='JMS message properties error:\n\n    
sent:%s\n\n    received:%s' % \
+                                     (msg_props, return_msg_props))
+            else:
+                self.fail(str(receive_obj))
 
 
 def create_testcase_class(broker_name, types, broker_addr, jms_message_type, 
shim_product):
@@ -382,143 +407,36 @@ def create_testcase_class(broker_name, types, 
broker_addr, jms_message_type, shi
     return new_class
 
 
-class Shim(object):
-    """
-    Abstract shim class, parent of all shims.
-    """
-    NAME = None
-    USE_SHELL = False
-
-    def __init__(self, args):
-        self.args = args
-        self.sender = None
-        self.receiver = None
-
-
-    def send(self, broker_addr, queue_name, jms_message_type, 
json_send_params_str):
-        """
-        Send the values of type jms_message_type in json_test_values_str to 
queue queue_name.
-        Return output (if any) from stdout.
-        """
-        arg_list = []
-        arg_list.extend(self.sender)
-        arg_list.extend([broker_addr, queue_name, jms_message_type])
-        arg_list.append(json_send_params_str)
-
-        try:
-            # Debug print statements: - these are helpful to see what is being 
sent to the send shims
-            #print '\n*** msg_hdr_list (%d): %s' % (msg_hdr_list_size, 
json_msg_hdr_list_str)
-            #print '\n*** msg_props_list (%d): %s' % (msg_props_list_size, 
json_msg_props_list_str)
-            #print '\n>>>', arg_list # DEBUG - useful to see command-line sent 
to shim
-            return check_output(arg_list, shell=self.USE_SHELL)
-        except CalledProcessError as exc:
-            return str(exc) + '\n\nOutput:\n' + exc.output
-        except Exception as exc:
-            return str(exc)
-
-
-    def receive(self, broker_addr, queue_name, jms_message_type, 
json_receive_params_str):
-        """
-        Receive json_test_num_values_str messages containing type 
jms_message_type from queue queue_name.
-        If the first line returned from stdout is the AMQP type, then the rest 
is assumed to be the returned
-        test value list. Otherwise error output is assumed.
-        """
-        output = ''
-        try:
-            arg_list = []
-            arg_list.extend(self.receiver)
-            arg_list.extend([broker_addr, queue_name, jms_message_type])
-            arg_list.append(json_receive_params_str)
-            # Debug print statement: this is useful to see what is being sent 
to the receive shims
-            #print '\n>>>', arg_list # DEBUG - useful to see command-line sent 
to shim
-            output = check_output(arg_list)
-            # Debug print statement: this is useful to see what is being 
returned from the receive shims
-            #print '<<<', output # DEBUG- useful to see text received from shim
-            str_tvl = output.split('\n')
-            if str_tvl[-1] == '': # Trailing \n, added by some versions of 
jsoncpp
-                str_tvl = str_tvl[:-1] # remove last empty string caused by 
trailing /n
-            if len(str_tvl) == 1:
-                return output
-            if len(str_tvl) == 4:
-                return (str_tvl[0], loads(str_tvl[1]), loads(str_tvl[2]), 
loads(str_tvl[3]))
-            return str_tvl
-        except CalledProcessError as exc:
-            return str(exc) + '\n\n' + exc.output
-        except Exception as exc:
-            return str(exc)
-
-
-class ProtonPythonShim(Shim):
-    """
-    Shim for qpid-proton Python client
-    """
-    NAME = 'ProtonPython'
-    SHIM_LOC = path.join(QPID_INTEROP_TEST_HOME, 'shims', 
'qpid-proton-python', 'src')
-
-    def __init__(self, args):
-        super(ProtonPythonShim, self).__init__(args)
-        self.sender = [path.join(self.SHIM_LOC, 'JmsSenderShim.py')]
-        self.receiver = [path.join(self.SHIM_LOC, 'JmsReceiverShim.py')]
-
-
-class ProtonCppShim(Shim):
-    """
-    Shim for qpid-proton Python client
-    """
-    NAME = 'ProtonCpp'
-    SHIM_LOC = path.join(QPID_INTEROP_TEST_HOME, 'shims', 'qpid-proton-cpp', 
'build', 'src')
-
-    def __init__(self, args):
-        super(ProtonCppShim, self).__init__(args)
-        self.sender = [path.join(self.SHIM_LOC, 'JmsSender')]
-        self.receiver = [path.join(self.SHIM_LOC, 'JmsReceiver')]
-
-
-class QpidJmsShim(Shim):
-    """
-    Shim for qpid-jms JMS client
-    """
-    NAME = 'QpidJms'
-
-    # Classpath components
-    MAVEN_REPO_PATH = getenv('MAVEN_REPO_PATH', path.join(getenv('HOME'), 
'.m2', 'repository'))
-    QPID_INTEROP_TEST_SHIM_JAR = path.join(MAVEN_REPO_PATH, 'org', 'apache', 
'qpid', 'qpid-interop-test-jms-shim',
-                                           '0.1.0-SNAPSHOT', 
'qpid-interop-test-jms-shim-0.1.0-SNAPSHOT.jar')
-
-    JAVA_HOME = getenv('JAVA_HOME', '/usr/lib/jvm/java') # Default only works 
in Linux
-    JAVA_EXEC = path.join(JAVA_HOME, 'bin/java')
-
-    def __init__(self, args):
-        super(QpidJmsShim, self).__init__(args)
-        dep_classpath_file = path.join(QPID_INTEROP_TEST_HOME, 'shims', 
'qpid-jms', 'cp.txt')
-        with open(dep_classpath_file, 'r') as dcpfile:
-            self.classpath = dcpfile.read().replace('\n', '')
-        if QpidJmsShim.jar_exists(self.QPID_INTEROP_TEST_SHIM_JAR):
-            self.classpath += ':' + self.QPID_INTEROP_TEST_SHIM_JAR
-        else:
-            print '*** ERROR: Cannot find jar file "%s"' % 
self.QPID_INTEROP_TEST_SHIM_JAR
-
-        self.sender = [self.JAVA_EXEC, '-cp', self.classpath, 
'org.apache.qpid.interop_test.shim.JmsSenderShim']
-        self.receiver = [self.JAVA_EXEC, '-cp', self.classpath, 
'org.apache.qpid.interop_test.shim.JmsReceiverShim']
-
-    @staticmethod
-    def jar_exists(jar_path):
-        """ Check if jar in attribute jar_path exists """
-        try:
-            jar_file = open(jar_path, 'rb')
-            jar_file.close()
-            return True
-        except IOError:
-            pass
-        return False
-
+PROTON_CPP_RECEIVER_SHIM = path.join(QPID_INTEROP_TEST_HOME, 'shims', 
'qpid-proton-cpp', 'build', 'src',
+                                     'JmsReceiver')
+PROTON_CPP_SENDER_SHIM = path.join(QPID_INTEROP_TEST_HOME, 'shims', 
'qpid-proton-cpp', 'build', 'src',
+                                   'JmsSender')
+PROTON_PYTHON_RECEIVER_SHIM = path.join(QPID_INTEROP_TEST_HOME, 'shims', 
'qpid-proton-python', 'src',
+                                        'JmsReceiverShim.py')
+PROTON_PYTHON_SENDER_SHIM = path.join(QPID_INTEROP_TEST_HOME, 'shims', 
'qpid-proton-python', 'src',
+                                      'JmsSenderShim.py')
+QIT_JMS_CLASSPATH_FILE = path.join(QPID_INTEROP_TEST_HOME, 'shims', 
'qpid-jms', 'cp.txt')
+with open(QIT_JMS_CLASSPATH_FILE, 'r') as classpath_file:
+    QIT_JMS_CLASSPATH = classpath_file.read()
+QPID_JMS_RECEIVER_SHIM = 'org.apache.qpid.interop_test.shim.JmsReceiverShim'
+QPID_JMS_SENDER_SHIM = 'org.apache.qpid.interop_test.shim.JmsSenderShim'
+
+# SHIM_MAP contains an instance of each client language shim that is to be 
tested as a part of this test. For
+# every shim in this list, a test is dynamically constructed which tests it 
against itself as well as every
+# other shim in the list.
+#
+# As new shims are added, add them into this map to have them included in the 
test cases.
+SHIM_MAP = {shims.ProtonCppShim.NAME: 
shims.ProtonCppShim(PROTON_CPP_SENDER_SHIM, PROTON_CPP_RECEIVER_SHIM),
+            shims.ProtonPythonShim.NAME: 
shims.ProtonPythonShim(PROTON_PYTHON_SENDER_SHIM, PROTON_PYTHON_RECEIVER_SHIM),
+            shims.QpidJmsShim.NAME: shims.QpidJmsShim(QIT_JMS_CLASSPATH, 
QPID_JMS_SENDER_SHIM, QPID_JMS_RECEIVER_SHIM),
+           }
 
 # TODO: Complete the test options to give fine control over running tests
 class TestOptions(object):
     """
     Class controlling command-line arguments used to control the test.
     """
-    def __init__(self, shims):
+    def __init__(self,):
         parser = argparse.ArgumentParser(description='Qpid-interop AMQP client 
interoparability test suite '
                                          'for JMS message types')
         parser.add_argument('--broker', action='store', 
default='localhost:5672', metavar='BROKER:PORT',
@@ -537,31 +455,18 @@ class TestOptions(object):
                             sorted(JmsMessageTypes.TYPE_MAP.keys()))
 #        shim_group = test_group.add_mutually_exclusive_group()
 #        shim_group.add_argument('--include-shim', action='append', 
metavar='SHIM-NAME',
-#                                help='Name of shim to include. Supported 
shims:\n%s' % SHIM_NAMES)
+#                                help='Name of shim to include. Supported 
shims:\n%s' % sorted(SHIM_MAP.keys()))
         parser.add_argument('--exclude-shim', action='append', 
metavar='SHIM-NAME',
-                            help='Name of shim to exclude. Supported 
shims:\n%s' % sorted(shims))
+                            help='Name of shim to exclude. Supported 
shims:\n%s' % sorted(SHIM_MAP.keys()))
         self.args = parser.parse_args()
 
 
 #--- Main program start ---
 
 if __name__ == '__main__':
-
-    SHIMS = [ProtonCppShim.NAME, QpidJmsShim.NAME, ProtonPythonShim.NAME]
-
-    ARGS = TestOptions(SHIMS).args
+    ARGS = TestOptions().args
     #print 'ARGS:', ARGS # debug
 
-    # SHIM_MAP contains an instance of each client language shim that is to be 
tested as a part of this test. For
-    # every shim in this list, a test is dynamically constructed which tests 
it against itself as well as every
-    # other shim in the list.
-    #
-    # As new shims are added, add them into this map to have them included in 
the test cases.
-    SHIM_MAP = {ProtonCppShim.NAME: ProtonCppShim(ARGS),
-                QpidJmsShim.NAME: QpidJmsShim(ARGS),
-                ProtonPythonShim.NAME: ProtonPythonShim(ARGS)
-               }
-
     # Connect to broker to find broker type
     CONNECTION_PROPS = broker_properties.getBrokerProperties(ARGS.broker)
     if CONNECTION_PROPS is None:
@@ -606,4 +511,3 @@ if __name__ == '__main__':
     RES = unittest.TextTestRunner(verbosity=2).run(TEST_SUITE)
     if not RES.wasSuccessful():
         sys.exit(1)
-

http://git-wip-us.apache.org/repos/asf/qpid-interop-test/blob/1c5a913b/src/python/qpid-interop-test/shims.py
----------------------------------------------------------------------
diff --git a/src/python/qpid-interop-test/shims.py 
b/src/python/qpid-interop-test/shims.py
new file mode 100644
index 0000000..08e1e7d
--- /dev/null
+++ b/src/python/qpid-interop-test/shims.py
@@ -0,0 +1,178 @@
+"""
+Module containing worker thread classes and shims
+"""
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+from json import loads
+from os import getenv, path
+from subprocess import check_output, CalledProcessError
+from threading import Thread
+
+
+THREAD_TIMEOUT = 15.0 # seconds to complete before join is forced
+
+
+class ShimWorkerThread(Thread):
+    """Parent class for shim worker threads and return a string once the 
thread has ended"""
+    def __init__(self, thread_name):
+        super(ShimWorkerThread, self).__init__(name=thread_name)
+        self.arg_list = []
+        self.return_obj = None
+
+    def get_return_object(self):
+        """Get the return object from the completed thread"""
+        return self.return_obj
+
+
+class Sender(ShimWorkerThread):
+    """Sender class for multi-threaded send"""
+    def __init__(self, use_shell_flag, send_shim_args, broker_addr, 
queue_name, type, json_test_str):
+        super(Sender, self).__init__('sender_thread')
+        if send_shim_args is None:
+            print 'ERROR: Sender: send_shim_args == None'
+        self.use_shell_flag = use_shell_flag
+        self.arg_list.extend(send_shim_args)
+        self.arg_list.extend([broker_addr, queue_name, type, json_test_str])
+
+    def run(self):
+        """Thread starts here"""
+        try:
+            #print '\n>>>', self.arg_list # DEBUG - useful to see command-line 
sent to shim
+            return_str = check_output(self.arg_list, shell=self.use_shell_flag)
+            if len(return_str) > 0:
+                self.return_obj = return_str
+        except CalledProcessError as exc:
+            self.return_obj = str(exc) + '\n\nOutput:\n' + exc.output
+
+
+class Receiver(ShimWorkerThread):
+    """Receiver class for multi-threaded receive"""
+    def __init__(self, receive_shim_args, broker_addr, queue_name, type, 
json_test_str):
+        super(Receiver, self).__init__('receiver_thread')
+        if receive_shim_args is None:
+            print 'ERROR: Receiver: receive_shim_args == None'
+        self.arg_list.extend(receive_shim_args)
+        self.arg_list.extend([broker_addr, queue_name, type, json_test_str])
+
+    def run(self):
+        """Thread starts here"""
+        try:
+            #print '\n>>>', self.arg_list # DEBUG - useful to see command-line 
sent to shim
+            output = check_output(self.arg_list)
+            #print '<<<', output # DEBUG - useful to see text received from 
shim
+            str_tvl = output.split('\n')[0:-1] # remove trailing \n
+            #if len(str_tvl) == 1:
+            #    self.return_obj = output
+            if len(str_tvl) == 2: # AMQP type test return
+                self.return_obj = loads(str_tvl[1])
+            elif len(str_tvl) == 4: # JMS test return
+                self.return_obj = (str_tvl[0], loads(str_tvl[1]), 
loads(str_tvl[2]), loads(str_tvl[3]))
+            else: # Make a single line of all the bits and return that
+                #self.return_obj = loads("".join(str_tvl[1:]))
+                self.return_obj = output
+        except CalledProcessError as exc:
+            self.return_obj = str(exc) + '\n\n' + exc.output
+
+class Shim(object):
+    """Abstract shim class, parent of all shims."""
+    NAME = None
+    def __init__(self, sender_shim, receiver_shim):
+        self.sender_shim = sender_shim
+        self.receiver_shim = receiver_shim
+        self.send_params = None
+        self.receive_params = None
+        self.use_shell_flag = False
+
+    def create_sender(self, broker_addr, queue_name, type, json_test_str):
+        """Create a new sender instance"""
+        return Sender(self.use_shell_flag, self.send_params, broker_addr, 
queue_name, type, json_test_str)
+
+    def create_receiver(self, broker_addr, queue_name, type, json_test_str):
+        """Create a new receiver instance"""
+        return Receiver(self.receive_params, broker_addr, queue_name, type, 
json_test_str)
+
+class ProtonPythonShim(Shim):
+    """Shim for qpid-proton Python client"""
+    NAME = 'ProtonPython'
+    def __init__(self, sender_shim, receiver_shim):
+        super(ProtonPythonShim, self).__init__(sender_shim, receiver_shim)
+        self.send_params = [self.sender_shim]
+        self.receive_params = [self.receiver_shim]
+
+
+class ProtonCppShim(Shim):
+    """Shim for qpid-proton C++ client"""
+    NAME = 'ProtonCpp'
+    def __init__(self, sender_shim, receiver_shim):
+        super(ProtonCppShim, self).__init__(sender_shim, receiver_shim)
+        self.send_params = [self.sender_shim]
+        self.receive_params = [self.receiver_shim]
+
+
+class QpidJmsShim(Shim):
+    """Shim for qpid-jms JMS client"""
+    NAME = 'QpidJms'
+
+    # Installed versions
+    # TODO: Automate this - it gets out of date quickly
+    # Maven works out all the deps, should use that
+    QPID_JMS_SHIM_VER = '0.1.0-SNAPSHOT'
+    QPID_JMS_VER = '0.20.0-SNAPSHOT'
+    QPID_PROTON_J_VER = '0.15.0-SNAPSHOT'
+    JMS_API_VER = '1.1.1'
+    LOGGER_API_VER = '1.7.21'
+    LOGGER_IMPL_VER = '1.7.21'
+    NETTY_VER = '4.0.40.Final'
+
+    # Classpath components
+    #QPID_INTEROP_TEST_SHIM_JAR = path.join(QPID_INTEROP_TEST_HOME, 'shims', 
'qpid-jms', 'target', 'qpid-jms-shim.jar')
+    MAVEN_REPO_PATH = path.join(getenv('HOME'), '.m2', 'repository')
+    JMS_API_JAR = path.join(MAVEN_REPO_PATH, 'org', 'apache', 'geronimo', 
'specs', 'geronimo-jms_1.1_spec', JMS_API_VER,
+                            'geronimo-jms_1.1_spec-%s.jar' % JMS_API_VER)
+    JMS_IMPL_JAR = path.join(MAVEN_REPO_PATH, 'org', 'apache', 'qpid', 
'qpid-jms-client', QPID_JMS_VER,
+                             'qpid-jms-client-%s.jar' % QPID_JMS_VER)
+    LOGGER_API_JAR = path.join(MAVEN_REPO_PATH, 'org', 'slf4j', 'slf4j-api', 
LOGGER_API_VER,
+                               'slf4j-api-%s.jar' % LOGGER_API_VER)
+    LOGGER_IMPL_JAR = path.join(MAVEN_REPO_PATH, 'org', 'slf4j', 'slf4j-nop', 
LOGGER_IMPL_VER,
+                                'slf4j-nop-%s.jar' % LOGGER_IMPL_VER)
+    PROTON_J_JAR = path.join(MAVEN_REPO_PATH, 'org', 'apache', 'qpid', 
'proton-j', QPID_PROTON_J_VER,
+                             'proton-j-%s.jar' % QPID_PROTON_J_VER)
+    NETTY_JAR = path.join(MAVEN_REPO_PATH, 'io', 'netty', 'netty-all', 
NETTY_VER, 'netty-all-%s.jar' % NETTY_VER)
+    QPID_JMS_SHIM_JAR = path.join(MAVEN_REPO_PATH, 'org', 'apache', 'qpid', 
'qpid-interop-test-jms-shim',
+                                  QPID_JMS_SHIM_VER, 
'qpid-interop-test-jms-shim-%s.jar' % QPID_JMS_SHIM_VER)
+
+    JAVA_HOME = getenv('JAVA_HOME', '/usr/bin') # Default only works in Linux
+    JAVA_EXEC = path.join(JAVA_HOME, 'java')
+
+    def __init__(self, dependency_class_path, sender_shim, receiver_shim):
+        super(QpidJmsShim, self).__init__(sender_shim, receiver_shim)
+        self.dependency_class_path = dependency_class_path
+        self.send_params = [self.JAVA_EXEC, '-cp', self.get_java_class_path(), 
self.sender_shim]
+        self.receive_params = [self.JAVA_EXEC, '-cp', 
self.get_java_class_path(), self.receiver_shim]
+
+    def get_java_class_path(self):
+        """Method to construct and return the Java class path necessary to run 
the shim"""
+        return ':'.join([self.QPID_JMS_SHIM_JAR, self.dependency_class_path])
+    #                     self.JMS_API_JAR,
+    #                     self.JMS_IMPL_JAR,
+    #                     self.LOGGER_API_JAR,
+    #                     self.LOGGER_IMPL_JAR,
+    #                     self.PROTON_J_JAR,
+    #                     self.NETTY_JAR])

http://git-wip-us.apache.org/repos/asf/qpid-interop-test/blob/1c5a913b/src/python/qpid-interop-test/types/simple_type_tests.py
----------------------------------------------------------------------
diff --git a/src/python/qpid-interop-test/types/simple_type_tests.py 
b/src/python/qpid-interop-test/types/simple_type_tests.py
index 0aa410f..429f506 100755
--- a/src/python/qpid-interop-test/types/simple_type_tests.py
+++ b/src/python/qpid-interop-test/types/simple_type_tests.py
@@ -28,16 +28,15 @@ import sys
 import unittest
 
 from itertools import product
-from json import dumps, loads
+from json import dumps
 from os import getenv, path
-from subprocess import check_output, CalledProcessError
 from time import mktime, time
 from uuid import UUID, uuid4
 
+import broker_properties
+import shims
 from proton import symbol
 from test_type_map import TestTypeMap
-import broker_properties
-
 
 # TODO: propose a sensible default when installation details are worked out
 QPID_INTEROP_TEST_HOME = getenv('QPID_INTEROP_TEST_HOME')
@@ -201,9 +200,12 @@ class AmqpPrimitiveTypes(TestTypeMap):
                   'short:8',
                   'short:9'] * 10
                 ],
-        'map': [{},
+        'map': [# Enpty map
+                {},
+                # Map with string keys
                 {'string:one': 'ubyte:1',
                  'string:two': 'ushort:2'},
+                # Map with other AMQP simple types as keys
                 {'none:': 'string:None',
                  'string:None': 'none:',
                  'string:One': 'long:-1234567890',
@@ -228,23 +230,24 @@ class AmqpPrimitiveTypes(TestTypeMap):
         #          ]
         }
 
-# TODO: Type 'unknown' corresponds to the Artemis broker at present because it 
does not return connection
-# properties that can identify it.  When this is fixed in Artemis, this will 
no longer work.
+    # This section contains tests that should be skipped because of know 
issues that would cause the test to fail.
+    # As the issues are resolved, these should be removed.
     BROKER_SKIP = {'null': {'ActiveMQ': 'Null type not sent in Proton Python 
binding: PROTON-1091',
                             'qpid-cpp': 'Null type not sent in Proton Python 
binding: PROTON-1091',},
                    'decimal32': {'ActiveMQ': 'decimal32 and decimal64 are sent 
byte reversed: PROTON-1160',
                                  'qpid-cpp': 'decimal32 not supported on 
qpid-cpp broker: QPIDIT-5, QPID-6328',
-                                 'unknown': 'decimal32 and decimal64 are sent 
byte reversed: PROTON-1160'},
+                                 'apache-activemq-artemis': 'decimal32 and 
decimal64 are sent byte reversed: PROTON-1160',
+                                 'qpid-dispatch-router': 'decimal32 and 
decimal64 are sent byte reversed: PROTON-1160'},
                    'decimal64': {'ActiveMQ': 'decimal32 and decimal64 are sent 
byte reversed: PROTON-1160',
                                  'qpid-cpp': 'decimal64 not supported on 
qpid-cpp broker: QPIDIT-6, QPID-6328',
-                                 'unknown': 'decimal32 and decimal64 are sent 
byte reversed: PROTON-1160'},
+                                 'apache-activemq-artemis': 'decimal32 and 
decimal64 are sent byte reversed: PROTON-1160',
+                                 'qpid-dispatch-router': 'decimal32 and 
decimal64 are sent byte reversed: PROTON-1160'},
                    'decimal128': {'qpid-cpp': 'decimal128 not supported on 
qpid-cpp broker: QPIDIT-3, QPID-6328',},
                    'char': {'qpid-cpp': 'char not supported on qpid-cpp 
broker: QPIDIT-4, QPID-6328',
-                            'unknown': 'char types > 16 bits truncated on 
Artemis: ENTMQ-1685'},
-                   'float': {'unknown': '-NaN is stripped of its sign: 
ENTMQ-1686'},
-                   'double': {'unknown': '-NaN is stripped of its sign: 
ENTMQ-1686'},
+                            'apache-activemq-artemis': 'char types > 16 bits 
truncated on Artemis: ENTMQ-1685'},
+                   'float': {'apache-activemq-artemis': '-NaN is stripped of 
its sign: ENTMQ-1686'},
+                   'double': {'apache-activemq-artemis': '-NaN is stripped of 
its sign: ENTMQ-1686'},
                   }
-#    BROKER_SKIP = {}
 
 
 class AmqpTypeTestCase(unittest.TestCase):
@@ -264,17 +267,36 @@ class AmqpTypeTestCase(unittest.TestCase):
             #queue_name = 'qpid-interop.simple_type_tests.%s.%s.%s' % 
(amqp_type, send_shim.NAME, receive_shim.NAME)
             queue_name = 'jms.queue.qpid-interop.simple_type_tests.%s.%s.%s' % 
\
                          (amqp_type, send_shim.NAME, receive_shim.NAME)
-            send_error_text = send_shim.send(broker_addr, queue_name, 
amqp_type, dumps(test_value_list))
-            if len(send_error_text) > 0:
-                self.fail('Send shim \'%s\':\n%s' % (send_shim.NAME, 
send_error_text))
-            receive_text = receive_shim.receive(broker_addr, queue_name, 
amqp_type, len(test_value_list))
-            if isinstance(receive_text, list):
-                self.assertEqual(receive_text, test_value_list, msg='\n    
sent:%s\nreceived:%s' % \
-                                 (test_value_list, receive_text))
+
+            # Start the receive shim first (for queueless brokers/dispatch)
+            receiver = receive_shim.create_receiver(broker_addr, queue_name, 
amqp_type,
+                                                    str(len(test_value_list)))
+            receiver.start()
+
+            # Start the send shim
+            sender = send_shim.create_sender(broker_addr, queue_name, 
amqp_type,
+                                             dumps(test_value_list))
+            sender.start()
+
+            # Wait for both shims to finish
+            sender.join(shims.THREAD_TIMEOUT)
+            receiver.join(shims.THREAD_TIMEOUT)
+
+            # Process return string from sender
+            send_obj = sender.get_return_object()
+            if send_obj is not None:
+                if isinstance(send_obj, str) and len(send_obj) > 0:
+                    self.fail('Send shim \'%s\':\n%s' % (send_shim.NAME, 
send_obj))
+                else:
+                    self.fail(str(send_obj))
+
+            # Process return string from receiver
+            receive_obj = receiver.get_return_object()
+            if isinstance(receive_obj, list):
+                self.assertEqual(receive_obj, test_value_list, msg='\n    
sent:%s\nreceived:%s' % \
+                                 (test_value_list, receive_obj))
             else:
-                self.fail(receive_text)
-        else:
-            self.fail('Type %s has no test values' % amqp_type)
+                self.fail(receive_obj)
 
 def create_testcase_class(broker_name, types, broker_addr, amqp_type, 
shim_product):
     """
@@ -309,125 +331,22 @@ def create_testcase_class(broker_name, types, 
broker_addr, amqp_type, shim_produ
     return new_class
 
 
-class Shim(object):
-    """
-    Abstract shim class, parent of all shims.
-    """
-    NAME = None
-    SEND = None
-    RECEIVE = None
-    USE_SHELL = False
-
-    def send(self, broker_addr, queue_name, amqp_type, json_test_values_str):
-        """
-        Send the values of type amqp_type in test_value_list to queue 
queue_name. Return output (if any) from stdout.
-        """
-        arg_list = []
-        arg_list.extend(self.SEND)
-        arg_list.extend([broker_addr, queue_name, amqp_type])
-        arg_list.append(json_test_values_str)
-
-        try:
-            #print '\n>>>', arg_list # DEBUG - useful to see command-line sent 
to shim
-            return check_output(arg_list, shell=self.USE_SHELL)
-        except CalledProcessError as exc:
-            return str(exc) + '\n\nOutput:\n' + exc.output
-        except Exception as exc:
-            return str(exc)
-
-
-    def receive(self, broker_addr, queue_name, amqp_type, num_test_values):
-        """
-        Receive num_test_values messages containing type amqp_type from queue 
queue_name. If the first line returned
-        from stdout is the AMQP type, then the rest is assumed to be the 
returned test value list. Otherwise error
-        output is assumed.
-        """
-        output = ''
-        try:
-            arg_list = []
-            arg_list.extend(self.RECEIVE)
-            arg_list.extend([broker_addr, queue_name, amqp_type, 
str(num_test_values)])
-            #print '\n>>>', arg_list # DEBUG - useful to see command-line sent 
to shim
-            output = check_output(arg_list)
-            #print '<<<', output # DEBUG - useful to see text received from 
shim
-            str_tvl = output.split('\n')[0:-1] # remove trailing \n
-            if len(str_tvl) == 1:
-                return output
-            if len(str_tvl) == 2:
-                return loads(str_tvl[1])
-            else:
-                return loads("".join(str_tvl[1:]))
-        except CalledProcessError as exc:
-            return str(exc) + '\n\n' + exc.output
-        except Exception as exc:
-            return str(exc)
-
-
-class ProtonPythonShim(Shim):
-    """
-    Shim for qpid-proton Python client
-    """
-    NAME = 'ProtonPython'
-    SHIM_LOC = path.join(QPID_INTEROP_TEST_HOME, 'shims', 
'qpid-proton-python', 'src')
-    SEND = [path.join(SHIM_LOC, 'TypesSenderShim.py')]
-    RECEIVE = [path.join(SHIM_LOC, 'TypesReceiverShim.py')]
-
-
-class ProtonCppShim(Shim):
-    """
-    Shim for qpid-proton C++ client
-    """
-    NAME = 'ProtonCpp'
-    SHIM_LOC = path.join(QPID_INTEROP_TEST_HOME, 'shims', 'qpid-proton-cpp', 
'build', 'src')
-    SEND = [path.join(SHIM_LOC, 'AmqpSender')]
-    RECEIVE = [path.join(SHIM_LOC, 'AmqpReceiver')]
-
-
-class QpidJmsShim(Shim):
-    """
-    Shim for qpid-jms JMS client
-    """
-    NAME = 'QpidJms'
-
-    # Installed qpid versions
-    QPID_JMS_VER = '0.4.0-SNAPSHOT'
-    QPID_PROTON_J_VER = '0.10-SNAPSHOT'
-
-    # Classpath components
-    QPID_INTEROP_TEST_SHIM_JAR = path.join(QPID_INTEROP_TEST_HOME, 'shims', 
'qpid-jms', 'target', 'qpid-jms-shim.jar')
-    MAVEN_REPO_PATH = path.join(getenv('HOME'), '.m2', 'repository')
-    JMS_API_JAR = path.join(MAVEN_REPO_PATH, 'org', 'apache', 'geronimo', 
'specs', 'geronimo-jms_1.1_spec', '1.1.1',
-                            'geronimo-jms_1.1_spec-1.1.1.jar')
-    JMS_IMPL_JAR = path.join(MAVEN_REPO_PATH, 'org', 'apache', 'qpid', 
'qpid-jms-client', QPID_JMS_VER,
-                             'qpid-jms-client-' + QPID_JMS_VER + '.jar')
-    LOGGER_API_JAR = path.join(MAVEN_REPO_PATH, 'org', 'slf4j', 'slf4j-api', 
'1.5.6', 'slf4j-api-1.5.6.jar')
-    LOGGER_IMPL_JAR = path.join(QPID_INTEROP_TEST_HOME, 'jars', 
'slf4j-nop-1.5.6.jar')
-    PROTON_J_JAR = path.join(MAVEN_REPO_PATH, 'org', 'apache', 'qpid', 
'proton-j', QPID_PROTON_J_VER,
-                             'proton-j-' + QPID_PROTON_J_VER + '.jar')
-    NETTY_JAR = path.join(MAVEN_REPO_PATH, 'io', 'netty', 'netty-all', 
'4.0.17.Final', 'netty-all-4.0.17.Final.jar')
-
-    CLASSPATH = ':'.join([QPID_INTEROP_TEST_SHIM_JAR,
-                          JMS_API_JAR,
-                          JMS_IMPL_JAR,
-                          LOGGER_API_JAR,
-                          LOGGER_IMPL_JAR,
-                          PROTON_J_JAR,
-                          NETTY_JAR])
-    JAVA_HOME = getenv('JAVA_HOME', '/usr/bin') # Default only works in Linux
-    JAVA_EXEC = path.join(JAVA_HOME, 'java')
-    SEND = [JAVA_EXEC, '-cp', CLASSPATH, 
'org.apache.qpid.interop_test.shim.AmqpSender']
-    RECEIVE = [JAVA_EXEC, '-cp', CLASSPATH, 
'org.apache.qpid.interop_test.shim.AmqpReceiver']
-
-
 # SHIM_MAP contains an instance of each client language shim that is to be 
tested as a part of this test. For
 # every shim in this list, a test is dynamically constructed which tests it 
against itself as well as every
 # other shim in the list.
 #
 # As new shims are added, add them into this map to have them included in the 
test cases.
-#SHIM_MAP = {ProtonPythonShim.NAME: ProtonPythonShim()}
-#SHIM_MAP = {ProtonPythonShim.NAME: ProtonCppShim()}
-SHIM_MAP = {ProtonCppShim.NAME: ProtonCppShim(),
-            ProtonPythonShim.NAME: ProtonPythonShim()
+PROTON_CPP_RECEIVER_SHIM = path.join(QPID_INTEROP_TEST_HOME, 'shims', 
'qpid-proton-cpp', 'build', 'src',
+                                     'AmqpReceiver')
+PROTON_CPP_SENDER_SHIM = path.join(QPID_INTEROP_TEST_HOME, 'shims', 
'qpid-proton-cpp', 'build', 'src',
+                                   'AmqpSender')
+PROTON_PYTHON_RECEIVER_SHIM = path.join(QPID_INTEROP_TEST_HOME, 'shims', 
'qpid-proton-python', 'src',
+                                        'TypesReceiverShim.py')
+PROTON_PYTHON_SENDER_SHIM = path.join(QPID_INTEROP_TEST_HOME, 'shims', 
'qpid-proton-python', 'src',
+                                      'TypesSenderShim.py')
+
+SHIM_MAP = {shims.ProtonCppShim.NAME: 
shims.ProtonCppShim(PROTON_CPP_SENDER_SHIM, PROTON_CPP_RECEIVER_SHIM),
+            shims.ProtonPythonShim.NAME: 
shims.ProtonPythonShim(PROTON_PYTHON_SENDER_SHIM, PROTON_PYTHON_RECEIVER_SHIM),
            }
 
 
@@ -454,7 +373,7 @@ class TestOptions(object):
                             sorted(AmqpPrimitiveTypes.TYPE_MAP.keys()))
 #        shim_group = test_group.add_mutually_exclusive_group()
 #        shim_group.add_argument('--include-shim', action='append', 
metavar='SHIM-NAME',
-#                                help='Name of shim to include. Supported 
shims:\n%s' % SHIM_NAMES)
+#                                help='Name of shim to include. Supported 
shims:\n%s' % sorted(SHIM_MAP.keys()))
         parser.add_argument('--exclude-shim', action='append', 
metavar='SHIM-NAME',
                             help='Name of shim to exclude. Supported 
shims:\n%s' % sorted(SHIM_MAP.keys()))
         self.args = parser.parse_args()
@@ -511,4 +430,3 @@ if __name__ == '__main__':
     RES = unittest.TextTestRunner(verbosity=2).run(TEST_SUITE)
     if not RES.wasSuccessful():
         sys.exit(1) # Errors or failures present
-


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org

Reply via email to