You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by sh...@apache.org on 2011/10/21 03:20:13 UTC

svn commit: r1187150 [17/43] - in /qpid/branches/QPID-2519: ./ bin/ cpp/ cpp/bindings/ cpp/bindings/qmf/python/ cpp/bindings/qmf/ruby/ cpp/bindings/qmf/tests/ cpp/bindings/qmf2/ cpp/bindings/qmf2/examples/cpp/ cpp/bindings/qmf2/python/ cpp/bindings/qmf...

Modified: qpid/branches/QPID-2519/cpp/src/tests/federation.py
URL: http://svn.apache.org/viewvc/qpid/branches/QPID-2519/cpp/src/tests/federation.py?rev=1187150&r1=1187149&r2=1187150&view=diff
==============================================================================
--- qpid/branches/QPID-2519/cpp/src/tests/federation.py (original)
+++ qpid/branches/QPID-2519/cpp/src/tests/federation.py Fri Oct 21 01:19:00 2011
@@ -23,7 +23,7 @@ from qpid.testlib import TestBase010
 from qpid.datatypes import Message
 from qpid.queue import Empty
 from qpid.util import URL
-from time import sleep, time
+from time import sleep
 
 
 class _FedBroker(object):
@@ -111,18 +111,18 @@ class FederationTests(TestBase010):
 
         broker = qmf.getObjects(_class="broker")[0]
         result = broker.connect(self.remote_host(), self.remote_port(), False, "PLAIN", "guest", "guest", "tcp")
-        self.assertEqual(result.status, 0, result)
+        self.assertEqual(result.status, 0)
 
         link = qmf.getObjects(_class="link")[0]
         result = link.bridge(False, "amq.direct", "amq.direct", "my-key", "", "", False, False, False, 0)
-        self.assertEqual(result.status, 0, result)
+        self.assertEqual(result.status, 0)
 
         bridge = qmf.getObjects(_class="bridge")[0]
         result = bridge.close()
-        self.assertEqual(result.status, 0, result)
+        self.assertEqual(result.status, 0)
 
         result = link.close()
-        self.assertEqual(result.status, 0, result)
+        self.assertEqual(result.status, 0)
 
         self.verify_cleanup()
 
@@ -133,11 +133,11 @@ class FederationTests(TestBase010):
         qmf = self.qmf
         broker = qmf.getObjects(_class="broker")[0]
         result = broker.connect(self.remote_host(), self.remote_port(), False, "PLAIN", "guest", "guest", "tcp")
-        self.assertEqual(result.status, 0, result)
+        self.assertEqual(result.status, 0)
 
         link = qmf.getObjects(_class="link")[0]
         result = link.bridge(False, "amq.direct", "amq.fanout", "my-key", "", "", False, False, False, 0)
-        self.assertEqual(result.status, 0, result)
+        self.assertEqual(result.status, 0)
 
         bridge = qmf.getObjects(_class="bridge")[0]
 
@@ -165,9 +165,9 @@ class FederationTests(TestBase010):
         except Empty: None
 
         result = bridge.close()
-        self.assertEqual(result.status, 0, result)
+        self.assertEqual(result.status, 0)
         result = link.close()
-        self.assertEqual(result.status, 0, result)
+        self.assertEqual(result.status, 0)
 
         self.verify_cleanup()
 
@@ -178,11 +178,11 @@ class FederationTests(TestBase010):
         qmf = self.qmf
         broker = qmf.getObjects(_class="broker")[0]
         result = broker.connect(self.remote_host(), self.remote_port(), False, "PLAIN", "guest", "guest", "tcp")
-        self.assertEqual(result.status, 0, result)
+        self.assertEqual(result.status, 0)
 
         link = qmf.getObjects(_class="link")[0]
         result = link.bridge(False, "amq.direct", "amq.fanout", "my-key", "", "", False, True, False, 0)
-        self.assertEqual(result.status, 0, result)
+        self.assertEqual(result.status, 0)
 
         bridge = qmf.getObjects(_class="bridge")[0]
 
@@ -209,9 +209,9 @@ class FederationTests(TestBase010):
         except Empty: None
 
         result = bridge.close()
-        self.assertEqual(result.status, 0, result)
+        self.assertEqual(result.status, 0)
         result = link.close()
-        self.assertEqual(result.status, 0, result)
+        self.assertEqual(result.status, 0)
 
         self.verify_cleanup()
 
@@ -236,11 +236,11 @@ class FederationTests(TestBase010):
         qmf = self.qmf
         broker = qmf.getObjects(_class="broker")[0]
         result = broker.connect(self.remote_host(), self.remote_port(), False, "PLAIN", "guest", "guest", "tcp")
-        self.assertEqual(result.status, 0, result)
+        self.assertEqual(result.status, 0)
 
         link = qmf.getObjects(_class="link")[0]
         result = link.bridge(False, "my-bridge-queue", "amq.fanout", "my-key", "", "", True, False, False, 1)
-        self.assertEqual(result.status, 0, result)
+        self.assertEqual(result.status, 0)
 
         bridge = qmf.getObjects(_class="bridge")[0]
         sleep(3)
@@ -262,63 +262,6 @@ class FederationTests(TestBase010):
         except Empty: None
 
         result = bridge.close()
-        self.assertEqual(result.status, 0, result)
-        result = link.close()
-        self.assertEqual(result.status, 0, result)
-
-        self.verify_cleanup()
-
-    def test_pull_from_queue_recovery(self):
-        session = self.session
-
-        #setup queue on remote broker and add some messages
-        r_conn = self.connect(host=self.remote_host(), port=self.remote_port())
-        r_session = r_conn.session("test_pull_from_queue_recovery")
-        r_session.queue_declare(queue="my-bridge-queue", auto_delete=True)
-        for i in range(1, 6):
-            dp = r_session.delivery_properties(routing_key="my-bridge-queue")
-            r_session.message_transfer(message=Message(dp, "Message %d" % i))
-
-        #setup queue to receive messages from local broker
-        session.queue_declare(queue="fed1", exclusive=True, auto_delete=True)
-        session.exchange_bind(queue="fed1", exchange="amq.fanout")
-        self.subscribe(queue="fed1", destination="f1")
-        queue = session.incoming("f1")
-
-        self.startQmf()
-        qmf = self.qmf
-        broker = qmf.getObjects(_class="broker")[0]
-        result = broker.connect(self.remote_host(), self.remote_port(), False, "PLAIN", "guest", "guest", "tcp")
-        self.assertEqual(result.status, 0, result)
-
-        link = qmf.getObjects(_class="link")[0]
-        result = link.bridge(False, "my-bridge-queue", "amq.fanout", "my-key", "", "", True, False, False, 1)
-        self.assertEqual(result.status, 0, result)
-
-        bridge = qmf.getObjects(_class="bridge")[0]
-        sleep(5)
-        
-        #recreate the remote bridge queue to invalidate the bridge session
-        r_session.queue_delete (queue="my-bridge-queue", if_empty=False, if_unused=False)
-        r_session.queue_declare(queue="my-bridge-queue", auto_delete=True)
-
-        #add some more messages (i.e. after bridge was created)
-        for i in range(6, 11):
-            dp = r_session.delivery_properties(routing_key="my-bridge-queue")
-            r_session.message_transfer(message=Message(dp, "Message %d" % i))
-
-        for i in range(1, 11):
-            try:
-                msg = queue.get(timeout=5)
-                self.assertEqual("Message %d" % i, msg.body)
-            except Empty:
-                self.fail("Failed to find expected message containing 'Message %d'" % i)
-        try:
-            extra = queue.get(timeout=1)
-            self.fail("Got unexpected message in queue: " + extra.body)
-        except Empty: None
-
-        result = bridge.close()
         self.assertEqual(result.status, 0)
         result = link.close()
         self.assertEqual(result.status, 0)
@@ -706,17 +649,10 @@ class FederationTests(TestBase010):
 
         self.verify_cleanup()
 
-    def test_dynamic_headers_any(self):
-        self.do_test_dynamic_headers('any')
-
-    def test_dynamic_headers_all(self):
-        self.do_test_dynamic_headers('all')
-
-
-    def do_test_dynamic_headers(self, match_mode):
+    def test_dynamic_headers(self):
         session = self.session
         r_conn = self.connect(host=self.remote_host(), port=self.remote_port())
-        r_session = r_conn.session("test_dynamic_headers_%s" % match_mode)
+        r_session = r_conn.session("test_dynamic_headers")
 
         session.exchange_declare(exchange="fed.headers", type="headers")
         r_session.exchange_declare(exchange="fed.headers", type="headers")
@@ -735,7 +671,7 @@ class FederationTests(TestBase010):
         sleep(5)
 
         session.queue_declare(queue="fed1", exclusive=True, auto_delete=True)
-        session.exchange_bind(queue="fed1", exchange="fed.headers", binding_key="key1", arguments={'x-match':match_mode, 'class':'first'})
+        session.exchange_bind(queue="fed1", exchange="fed.headers", binding_key="key1", arguments={'x-match':'any', 'class':'first'})
         self.subscribe(queue="fed1", destination="f1")
         queue = session.incoming("f1")
 
@@ -1855,301 +1791,3 @@ class FederationTests(TestBase010):
         if headers:
             return headers[name]
         return None
-
-    def test_dynamic_topic_bounce(self):
-        """ Bounce the connection between federated Topic Exchanges.
-        """
-        class Params:
-            def exchange_type(self): return "topic"
-            def bind_queue(self, ssn, qname, ename):
-                ssn.exchange_bind(queue=qname, exchange=ename,
-                                  binding_key="spud.*")
-            def unbind_queue(self, ssn, qname, ename):
-                ssn.exchange_unbind(queue=qname, exchange=ename, binding_key="spud.*")
-            def delivery_properties(self, ssn):
-                return  ssn.delivery_properties(routing_key="spud.boy")
-
-        self.generic_dynamic_bounce_test(Params())
-
-    def test_dynamic_direct_bounce(self):
-        """ Bounce the connection between federated Direct Exchanges.
-        """
-        class Params:
-            def exchange_type(self): return "direct"
-            def bind_queue(self, ssn, qname, ename):
-                ssn.exchange_bind(queue=qname, exchange=ename, binding_key="spud")
-            def unbind_queue(self, ssn, qname, ename):
-                ssn.exchange_unbind(queue=qname, exchange=ename, binding_key="spud")
-            def delivery_properties(self, ssn):
-                return  ssn.delivery_properties(routing_key="spud")
-        self.generic_dynamic_bounce_test(Params())
-
-    def test_dynamic_fanout_bounce(self):
-        """ Bounce the connection between federated Fanout Exchanges.
-        """
-        class Params:
-            def exchange_type(self): return "fanout"
-            def bind_queue(self, ssn, qname, ename):
-                ssn.exchange_bind(queue=qname, exchange=ename)
-            def unbind_queue(self, ssn, qname, ename):
-                ssn.exchange_unbind(queue=qname, exchange=ename)
-            def delivery_properties(self, ssn):
-                return  ssn.delivery_properties(routing_key="spud")
-        self.generic_dynamic_bounce_test(Params())
-
-    def test_dynamic_headers_bounce(self):
-        """ Bounce the connection between federated Headers Exchanges.
-        """
-        class Params:
-            def exchange_type(self): return "headers"
-            def bind_queue(self, ssn, qname, ename):
-                ssn.exchange_bind(queue=qname, exchange=ename,
-                                  binding_key="spud", arguments={'x-match':'any', 'class':'first'})
-            def unbind_queue(self, ssn, qname, ename):
-                ssn.exchange_unbind(queue=qname, exchange=ename, binding_key="spud")
-            def delivery_properties(self, ssn):
-                return  ssn.message_properties(application_headers={'class':'first'})
-        ## @todo KAG - re-enable once federation bugs with headers exchanges
-        ## are fixed.
-        #self.generic_dynamic_bounce_test(Params())
-        return
-
-
-    def generic_dynamic_bounce_test(self, params):
-        """ Verify that a federated broker can maintain a binding to a local
-        queue using the same key as a remote binding.  Destroy and reconnect
-        the federation link, and verify routes are restored correctly.
-        See QPID-3170.
-        Topology:
-
-        Queue1 <---"Key"---B0<==[Federated Exchange]==>B1---"Key"--->Queue2
-        """
-        session = self.session
-
-        # create the federation
-
-        self.startQmf()
-        qmf = self.qmf
-
-        self._setup_brokers()
-
-        # create exchange on each broker, and retrieve the corresponding
-        # management object for that exchange
-
-        exchanges=[]
-        for _b in self._brokers[0:2]:
-            _b.client_session.exchange_declare(exchange="fedX", type=params.exchange_type())
-            self.assertEqual(_b.client_session.exchange_query(name="fedX").type,
-                             params.exchange_type(), "exchange_declare failed!")
-            # pull the exchange out of qmf...
-            retries = 0
-            my_exchange = None
-            timeout = time() + 10
-            while my_exchange is None and time() <= timeout:
-                objs = qmf.getObjects(_broker=_b.qmf_broker, _class="exchange")
-                for ooo in objs:
-                    if ooo.name == "fedX":
-                        my_exchange = ooo
-                        break
-            if my_exchange is None:
-                self.fail("QMF failed to find new exchange!")
-            exchanges.append(my_exchange)
-
-        #
-        # on each broker, create a local queue bound to the exchange with the
-        # same key value.
-        #
-
-        self._brokers[0].client_session.queue_declare(queue="fedX1", exclusive=True, auto_delete=True)
-        params.bind_queue(self._brokers[0].client_session, "fedX1", "fedX")
-        self.subscribe(self._brokers[0].client_session, queue="fedX1", destination="f1")
-        queue_0 = self._brokers[0].client_session.incoming("f1")
-
-        self._brokers[1].client_session.queue_declare(queue="fedX1", exclusive=True, auto_delete=True)
-        params.bind_queue(self._brokers[1].client_session, "fedX1", "fedX")
-        self.subscribe(self._brokers[1].client_session, queue="fedX1", destination="f1")
-        queue_1 = self._brokers[1].client_session.incoming("f1")
-
-        # now federate the two brokers
-
-        # connect B0 --> B1
-        result = self._brokers[1].qmf_object.connect(self._brokers[0].host,
-                                                     self._brokers[0].port,
-                                                     False, "PLAIN", "guest", "guest", "tcp")
-        self.assertEqual(result.status, 0)
-
-        # connect B1 --> B0
-        result = self._brokers[0].qmf_object.connect(self._brokers[1].host,
-                                                     self._brokers[1].port,
-                                                     False, "PLAIN", "guest", "guest", "tcp")
-        self.assertEqual(result.status, 0)
-
-        # for each link, bridge the "fedX" exchanges:
-
-        for _l in qmf.getObjects(_class="link"):
-            # print("Link=%s:%s %s" % (_l.host, _l.port, str(_l.getBroker())))
-            result = _l.bridge(False,  # durable
-                                 "fedX",  # src
-                                 "fedX",  # dst
-                                 "",  # key
-                                 "",  # tag
-                                 "",  # excludes
-                                 False, # srcIsQueue
-                                 False, # srcIsLocal
-                                 True,  # dynamic
-                                 0)     # sync
-            self.assertEqual(result.status, 0)
-
-        # wait for all the inter-broker links to become operational
-        operational = False
-        timeout = time() + 10
-        while not operational and time() <= timeout:
-            operational = True
-            for _l in qmf.getObjects(_class="link"):
-                #print("Link=%s:%s %s" % (_l.host, _l.port, str(_l.state)))
-                if _l.state != "Operational":
-                    operational = False
-        self.failUnless(operational, "inter-broker links failed to become operational.")
-
-        # @todo - There is no way to determine when the bridge objects become
-        # active.
-
-        # wait until the binding key has propagated to each broker - each
-        # broker should see 2 bindings (1 local, 1 remote)
-
-        binding_counts = [2, 2]
-        self.assertEqual(len(binding_counts), len(exchanges), "Update Test!")
-        for i in range(2):
-            exchanges[i].update()
-            timeout = time() + 10
-            while exchanges[i].bindingCount < binding_counts[i] and time() <= timeout:
-                exchanges[i].update()
-            self.failUnless(exchanges[i].bindingCount == binding_counts[i])
-
-        # send 10 msgs to B0
-        for i in range(1, 11):
-            # dp = self._brokers[0].client_session.delivery_properties(routing_key=params.routing_key())
-            dp = params.delivery_properties(self._brokers[0].client_session)
-            self._brokers[0].client_session.message_transfer(destination="fedX", message=Message(dp, "Message_trp %d" % i))
-
-        # get exactly 10 msgs on B0's local queue and B1's queue
-        for i in range(1, 11):
-            try:
-                msg = queue_0.get(timeout=5)
-                self.assertEqual("Message_trp %d" % i, msg.body)
-                msg = queue_1.get(timeout=5)
-                self.assertEqual("Message_trp %d" % i, msg.body)
-            except Empty:
-                self.fail("Only got %d msgs - expected 10" % i)
-        try:
-            extra = queue_0.get(timeout=1)
-            self.fail("Got unexpected message in queue_0: " + extra.body)
-        except Empty: None
-
-        try:
-            extra = queue_1.get(timeout=1)
-            self.fail("Got unexpected message in queue_1: " + extra.body)
-        except Empty: None
-
-        #
-        # Tear down the bridges between the two exchanges, then wait
-        # for the bindings to be cleaned up
-        #
-
-        for _b in qmf.getObjects(_class="bridge"):
-            result = _b.close()
-            self.assertEqual(result.status, 0)
-
-        binding_counts = [1, 1]
-        self.assertEqual(len(binding_counts), len(exchanges), "Update Test!")
-        for i in range(2):
-            exchanges[i].update()
-            timeout = time() + 10
-            while exchanges[i].bindingCount != binding_counts[i] and time() <= timeout:
-                exchanges[i].update()
-            self.failUnless(exchanges[i].bindingCount == binding_counts[i])
-
-        #
-        # restore the bridges between the two exchanges, and wait for the
-        # bindings to propagate.
-        #
-
-        for _l in qmf.getObjects(_class="link"):
-            # print("Link=%s:%s %s" % (_l.host, _l.port, str(_l.getBroker())))
-            result = _l.bridge(False,  # durable
-                                 "fedX",  # src
-                                 "fedX",  # dst
-                                 "",  # key
-                                 "",  # tag
-                                 "",  # excludes
-                                 False, # srcIsQueue
-                                 False, # srcIsLocal
-                                 True,  # dynamic
-                                 0)     # sync
-            self.assertEqual(result.status, 0)
-
-        binding_counts = [2, 2]
-        self.assertEqual(len(binding_counts), len(exchanges), "Update Test!")
-        for i in range(2):
-            exchanges[i].update()
-            timeout = time() + 10
-            while exchanges[i].bindingCount != binding_counts[i] and time() <= timeout:
-                exchanges[i].update()
-            self.failUnless(exchanges[i].bindingCount == binding_counts[i])
-
-        #
-        # verify traffic flows correctly
-        #
-
-        for i in range(1, 11):
-            #dp = self._brokers[1].client_session.delivery_properties(routing_key=params.routing_key())
-            dp = params.delivery_properties(self._brokers[1].client_session)
-            self._brokers[1].client_session.message_transfer(destination="fedX", message=Message(dp, "Message_trp %d" % i))
-
-        # get exactly 10 msgs on B0's queue and B1's queue
-        for i in range(1, 11):
-            try:
-                msg = queue_0.get(timeout=5)
-                self.assertEqual("Message_trp %d" % i, msg.body)
-                msg = queue_1.get(timeout=5)
-                self.assertEqual("Message_trp %d" % i, msg.body)
-            except Empty:
-                self.fail("Only got %d msgs - expected 10" % i)
-        try:
-            extra = queue_0.get(timeout=1)
-            self.fail("Got unexpected message in queue_0: " + extra.body)
-        except Empty: None
-
-        try:
-            extra = queue_1.get(timeout=1)
-            self.fail("Got unexpected message in queue_1: " + extra.body)
-        except Empty: None
-
-
-        #
-        # cleanup
-        #
-        params.unbind_queue(self._brokers[0].client_session, "fedX1", "fedX")
-        self._brokers[0].client_session.message_cancel(destination="f1")
-        self._brokers[0].client_session.queue_delete(queue="fedX1")
-
-        params.unbind_queue(self._brokers[1].client_session, "fedX1", "fedX")
-        self._brokers[1].client_session.message_cancel(destination="f1")
-        self._brokers[1].client_session.queue_delete(queue="fedX1")
-
-        for _b in qmf.getObjects(_class="bridge"):
-            result = _b.close()
-            self.assertEqual(result.status, 0)
-
-        for _l in qmf.getObjects(_class="link"):
-            result = _l.close()
-            self.assertEqual(result.status, 0)
-
-        for _b in self._brokers[0:2]:
-            _b.client_session.exchange_delete(exchange="fedX")
-
-        self._teardown_brokers()
-
-        self.verify_cleanup()
-
-

Modified: qpid/branches/QPID-2519/cpp/src/tests/python_tests
URL: http://svn.apache.org/viewvc/qpid/branches/QPID-2519/cpp/src/tests/python_tests?rev=1187150&r1=1187149&r2=1187150&view=diff
==============================================================================
--- qpid/branches/QPID-2519/cpp/src/tests/python_tests (original)
+++ qpid/branches/QPID-2519/cpp/src/tests/python_tests Fri Oct 21 01:19:00 2011
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 #
 # Licensed to the Apache Software Foundation (ASF) under one

Modified: qpid/branches/QPID-2519/cpp/src/tests/qpid-cluster-benchmark
URL: http://svn.apache.org/viewvc/qpid/branches/QPID-2519/cpp/src/tests/qpid-cluster-benchmark?rev=1187150&r1=1187149&r2=1187150&view=diff
==============================================================================
--- qpid/branches/QPID-2519/cpp/src/tests/qpid-cluster-benchmark (original)
+++ qpid/branches/QPID-2519/cpp/src/tests/qpid-cluster-benchmark Fri Oct 21 01:19:00 2011
@@ -7,9 +7,9 @@
 # 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
@@ -19,40 +19,21 @@
 #
 
 # Benchmark script for comparing cluster performance.
+#PORT=":5555"
+BROKER=`echo $HOSTS | awk '{print $1}'`	# Single broker
+BROKERS=`echo $HOSTS | sed "s/\>/$PORT/g;s/ /,/g"` # Broker URL list
+COUNT=100000
+RATE=20000			# Rate to throttle senders for latency results
+run_test() { echo $*; "$@"; echo; echo; echo; }
 
-# Default values
-PORT="5672"
-COUNT=10000
-FLOW=100	      # Flow control limit on queue depth for latency.
-REPEAT=10
-QUEUES=4
-CLIENTS=3
-
-while getopts "p:c:f:r:t:b:q:c" opt; do
-    case $opt in
-	p) PORT=$OPTARG;;
-	c) COUNT=$OPTARG;;
-	f) FLOW=$OPTARG;;
-	r) REPEAT=$OPTARG;;
-	s) SCALE=$OPTARG;;
-	b) BROKERS=$OPTARG;;
-	q) QUEUES=$OPTARG;;
-	c) CLIENTS=$OPTARG;;
-	*) echo "Unknown option"; exit 1;;
-    esac
-done
-
-BROKERS=${BROKERS:-$(echo $HOSTS | sed "s/\>/:$PORT/g;s/ /,/g")} # Broker URL list
-BROKER=`echo $BROKERS | awk -F, '{print $1}'` # First broker
+# Thruput,  unshared queue
+run_test qpid-cpp-benchmark --repeat 10 -b $BROKER --no-timestamp -m $COUNT
 
-run_test() { echo $*; shift; "$@"; echo; echo; echo; }
+# Latency
+run_test qpid-cpp-benchmark --repeat 10 -b $BROKER --connection-options '{tcp-nodelay:true}' -m `expr $COUNT / 2` --send-rate $RATE
 
 # Multiple pubs/subs connect via multiple brokers (active-active)
-run_test "multi-host-thruput" qpid-cpp-benchmark --repeat $REPEAT -b $BROKERS --no-timestamp --summarize -q$QUEUES -s$CLIENTS -r$CLIENTS -m $COUNT
+run_test qpid-cpp-benchmark --repeat 10 -b $BROKERS --no-timestamp --summarize -s10 -r10 -m `expr $COUNT / 10`
 
 # Multiple pubs/subs connect via single broker (active-passive)
-run_test "single-host-thruput" qpid-cpp-benchmark --repeat $REPEAT -b $BROKER --no-timestamp --summarize -q$QUEUES -s$CLIENTS -r$CLIENTS -m $COUNT
-
-# Latency
-run_test "latency" qpid-cpp-benchmark --repeat $REPEAT -b $BROKER --connection-options '{tcp-nodelay:true}' -m $COUNT --flow-control $FLOW
-
+run_test qpid-cpp-benchmark --repeat 10 -b $BROKER --no-timestamp --summarize -s10 -r10 -m `expr $COUNT / 10`

Modified: qpid/branches/QPID-2519/cpp/src/tests/qpid-cpp-benchmark
URL: http://svn.apache.org/viewvc/qpid/branches/QPID-2519/cpp/src/tests/qpid-cpp-benchmark?rev=1187150&r1=1187149&r2=1187150&view=diff
==============================================================================
--- qpid/branches/QPID-2519/cpp/src/tests/qpid-cpp-benchmark (original)
+++ qpid/branches/QPID-2519/cpp/src/tests/qpid-cpp-benchmark Fri Oct 21 01:19:00 2011
@@ -77,20 +77,6 @@ def ssh_command(host, command):
     """Convert command into an ssh command on host with quoting"""
     return ["ssh", host] + [posix_quote(arg) for arg in command]
 
-class Clients:
-    def __init__(self): self.clients=[]
-
-    def add(self, client):
-        self.clients.append(client)
-        return client
-
-    def kill(self):
-        for c in self.clients:
-            try: c.kill()
-            except: pass
-
-clients = Clients()
-
 def start_receive(queue, index, opts, ready_queue, broker, host):
     address_opts=["create:receiver"] + opts.receive_option
     if opts.durable: address_opts += ["node:{durable:true}"]
@@ -115,7 +101,7 @@ def start_receive(queue, index, opts, re
     if opts.connection_options:
         command += ["--connection-options",opts.connection_options]
     if host: command = ssh_command(host, command)
-    return clients.add(Popen(command, stdout=PIPE))
+    return Popen(command, stdout=PIPE)
 
 def start_send(queue, opts, broker, host):
     address="%s;{%s}"%(queue,",".join(opts.send_option))
@@ -136,7 +122,7 @@ def start_send(queue, opts, broker, host
     if opts.connection_options:
         command += ["--connection-options",opts.connection_options]
     if host: command = ssh_command(host, command)
-    return clients.add(Popen(command, stdout=PIPE))
+    return Popen(command, stdout=PIPE)
 
 def first_line(p):
     out,err=p.communicate()
@@ -147,11 +133,7 @@ def delete_queues(queues, broker):
     c = qpid.messaging.Connection(broker)
     c.open()
     for q in queues:
-        try:
-            s = c.session()
-            snd = s.sender("%s;{delete:always}"%(q))
-            snd.close()
-            s.sync()
+        try: s = c.session().sender("%s;{delete:always}"%(q))
         except qpid.messaging.exceptions.NotFound: pass # Ignore "no such queue"
     c.close()
 
@@ -163,6 +145,7 @@ def print_header(timestamp):
 def parse(parser, lines):               # Parse sender/receiver output
     for l in lines:
         fn_val = zip(parser, l)
+
     return [map(lambda p: p[0](p[1]), zip(parser,line.split())) for line in lines]
 
 def parse_senders(senders):
@@ -173,12 +156,11 @@ def parse_receivers(receivers):
 
 def print_data(send_stats, recv_stats):
     for send,recv in map(None, send_stats, recv_stats):
-        line=""
-        if send: line += "%d"%send[0]
+        if send: print send[0],
         if recv:
-            line += "\t\t%d"%recv[0]
-            if len(recv) == 4: line += "\t%.2f\t%.2f\t%.2f"%tuple(recv[1:])
-        print line
+            print "\t\t%d"%recv[0],
+            if len(recv) == 4: print "\t%.2f\t%.2f\t%.2f"%tuple(recv[1:]),
+        print
 
 def print_summary(send_stats, recv_stats):
     def avg(s): sum(s) / len(s)
@@ -202,11 +184,11 @@ class ReadyReceiver:
         self.receiver = self.connection.session().receiver(
             "%s;{create:receiver,delete:receiver,node:{durable:false}}"%(queue))
         self.receiver.session.sync()
-        self.timeout=10
+        self.timeout=2
 
     def wait(self, receivers):
         try:
-            for i in receivers: self.receiver.fetch(self.timeout)
+            for i in xrange(len(receivers)): self.receiver.fetch(self.timeout)
             self.connection.close()
         except qpid.messaging.Empty:
             for r in receivers:
@@ -215,8 +197,7 @@ class ReadyReceiver:
                     raise Exception("Receiver error: %s"%(out))
             raise Exception("Timed out waiting for receivers to be ready")
 
-def flatten(l):
-    return sum(map(lambda s: re.split(re.compile("\s*,\s*|\s+"), s), l), [])
+def flatten(l): return sum(map(lambda s: s.split(","), l),[])
 
 class RoundRobin:
     def __init__(self,items):
@@ -240,22 +221,20 @@ def main():
     receive_out = ""
     ready_queue="%s-ready"%(opts.queue_name)
     queues = ["%s-%s"%(opts.queue_name, i) for i in xrange(opts.queues)]
-    try:
-        for i in xrange(opts.repeat):
-            delete_queues(queues, opts.broker[0])
-            ready_receiver = ReadyReceiver(ready_queue, opts.broker[0])
-            receivers = [start_receive(q, j, opts, ready_queue, brokers.next(), client_hosts.next())
-                         for q in queues for j in xrange(opts.receivers)]
-            ready_receiver.wait(filter(None, receivers)) # Wait for receivers to be ready.
-            senders = [start_send(q, opts,brokers.next(), client_hosts.next())
-                       for q in queues for j in xrange(opts.senders)]
-            if opts.report_header and i == 0: print_header(opts.timestamp)
-            send_stats=parse_senders(senders)
-            recv_stats=parse_receivers(receivers)
-            if opts.summarize: print_summary(send_stats, recv_stats)
-            else: print_data(send_stats, recv_stats)
-            delete_queues(queues, opts.broker[0])
-    finally: clients.kill()             # No strays
+    for i in xrange(opts.repeat):
+        delete_queues(queues, opts.broker[0])
+        ready_receiver = ReadyReceiver(ready_queue, opts.broker[0])
+        receivers = [start_receive(q, j, opts, ready_queue, brokers.next(), client_hosts.next())
+                     for q in queues for j in xrange(opts.receivers)]
+        ready_receiver.wait(filter(None, receivers)) # Wait for receivers to be ready.
+        senders = [start_send(q, opts,brokers.next(), client_hosts.next())
+                   for q in queues for j in xrange(opts.senders)]
+        if opts.report_header and i == 0: print_header(opts.timestamp)
+        send_stats=parse_senders(senders)
+        recv_stats=parse_receivers(receivers)
+        if opts.summarize: print_summary(send_stats, recv_stats)
+        else: print_data(send_stats, recv_stats)
+        delete_queues(queues, opts.broker[0])
 
 if __name__ == "__main__": main()
 

Modified: qpid/branches/QPID-2519/cpp/src/tests/qpid-ctrl
URL: http://svn.apache.org/viewvc/qpid/branches/QPID-2519/cpp/src/tests/qpid-ctrl?rev=1187150&r1=1187149&r2=1187150&view=diff
==============================================================================
--- qpid/branches/QPID-2519/cpp/src/tests/qpid-ctrl (original)
+++ qpid/branches/QPID-2519/cpp/src/tests/qpid-ctrl Fri Oct 21 01:19:00 2011
@@ -92,10 +92,7 @@ try:
   arguments = {}
   for a in args:
     name, val = nameval(a)
-    if val[0] == '{' or val[0] == '[':
-      arguments[name] = eval(val)
-    else:
-      arguments[name] = val
+    arguments[name] = val
   content = {
              "_object_id": {"_object_name": object_name},
              "_method_name": method_name,

Modified: qpid/branches/QPID-2519/cpp/src/tests/qpid-perftest.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/QPID-2519/cpp/src/tests/qpid-perftest.cpp?rev=1187150&r1=1187149&r2=1187150&view=diff
==============================================================================
--- qpid/branches/QPID-2519/cpp/src/tests/qpid-perftest.cpp (original)
+++ qpid/branches/QPID-2519/cpp/src/tests/qpid-perftest.cpp Fri Oct 21 01:19:00 2011
@@ -396,7 +396,7 @@ struct Controller : public Client {
     void run() {                // Controller
         try {
             // Wait for subscribers to be ready.
-            process(opts.totalSubs, fqn("sub_ready"), boost::bind(expect, _1, "ready"));
+            process(opts.totalSubs, fqn("sub_ready"), bind(expect, _1, "ready"));
 
             LocalQueue pubDone;
             LocalQueue subDone;
@@ -423,10 +423,8 @@ struct Controller : public Client {
                 process(opts.totalSubs, subDone, fqn("sub_done"), boost::ref(subRates));
 
                 AbsTime end=now();
+
                 double time=secs(start, end);
-		if (time <= 0.0) {
-		  throw Exception("ERROR: Test completed in zero seconds. Try again with a larger message count.");
-		}
                 double txrate=opts.transfers/time;
                 double mbytes=(txrate*opts.size)/(1024*1024);
 
@@ -510,11 +508,10 @@ struct PublishThread : public Client {
             }
             SubscriptionManager subs(session);
             LocalQueue lq;
-            subs.setFlowControl(0, SubscriptionManager::UNLIMITED, false);
-            Subscription cs = subs.subscribe(lq, fqn("pub_start"));
+            subs.setFlowControl(1, SubscriptionManager::UNLIMITED, true);
+            subs.subscribe(lq, fqn("pub_start"));
 
             for (size_t j = 0; j < opts.iterations; ++j) {
-                cs.grantMessageCredit(1);
                 expect(lq.pop().getData(), "start");
                 AbsTime start=now();
                 for (size_t i=0; i<opts.count; i++) {
@@ -546,9 +543,6 @@ struct PublishThread : public Client {
                 if (opts.confirm) session.sync();
                 AbsTime end=now();
                 double time=secs(start,end);
-		if (time <= 0.0) {
-		  throw Exception("ERROR: Test completed in zero seconds. Try again with a larger message count.");
-		}
 
                 // Send result to controller.
                 Message report(lexical_cast<string>(opts.count/time), fqn("pub_done"));
@@ -644,9 +638,7 @@ struct SubscribeThread : public Client {
                     //
                     // For now verify order only for a single publisher.
                     size_t offset = opts.uniqueData ? 5 /*marker is 'data:'*/ : 0;
-                    size_t n;
-                    memcpy (&n, reinterpret_cast<const char*>(msg.getData().data() + offset),
-                        sizeof(n));
+                    size_t n = *reinterpret_cast<const size_t*>(msg.getData().data() + offset);
                     if (opts.pubs == 1) {
                         if (opts.subs == 1 || opts.mode == FANOUT) verify(n==expect, "==", expect, n);
                         else verify(n>=expect, ">=", expect, n);

Modified: qpid/branches/QPID-2519/cpp/src/tests/qpid-receive.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/QPID-2519/cpp/src/tests/qpid-receive.cpp?rev=1187150&r1=1187149&r2=1187150&view=diff
==============================================================================
--- qpid/branches/QPID-2519/cpp/src/tests/qpid-receive.cpp (original)
+++ qpid/branches/QPID-2519/cpp/src/tests/qpid-receive.cpp Fri Oct 21 01:19:00 2011
@@ -53,7 +53,6 @@ struct Options : public qpid::Options
     bool forever;
     uint messages;
     bool ignoreDuplicates;
-    bool checkRedelivered;
     uint capacity;
     uint ackFrequency;
     uint tx;
@@ -76,7 +75,6 @@ struct Options : public qpid::Options
           forever(false),
           messages(0),
           ignoreDuplicates(false),
-          checkRedelivered(false),
           capacity(1000),
           ackFrequency(100),
           tx(0),
@@ -94,11 +92,10 @@ struct Options : public qpid::Options
             ("broker,b", qpid::optValue(url, "URL"), "url of broker to connect to")
             ("address,a", qpid::optValue(address, "ADDRESS"), "address to receive from")
             ("connection-options", qpid::optValue(connectionOptions, "OPTIONS"), "options for the connection")
-            ("timeout", qpid::optValue(timeout, "TIMEOUT"), "timeout in seconds to wait before exiting")
+            ("timeout,t", qpid::optValue(timeout, "TIMEOUT"), "timeout in seconds to wait before exiting")
             ("forever,f", qpid::optValue(forever), "ignore timeout and wait forever")
             ("messages,m", qpid::optValue(messages, "N"), "Number of messages to receive; 0 means receive indefinitely")
             ("ignore-duplicates", qpid::optValue(ignoreDuplicates), "Detect and ignore duplicates (by checking 'sn' header)")
-            ("check-redelivered", qpid::optValue(checkRedelivered), "Fails with exception if a duplicate is not marked as redelivered (only relevant when ignore-duplicates is selected)")
             ("capacity", qpid::optValue(capacity, "N"), "Pre-fetch window (0 implies no pre-fetch)")
             ("ack-frequency", qpid::optValue(ackFrequency, "N"), "Ack frequency (0 implies none of the messages will get accepted)")
             ("tx", qpid::optValue(tx, "N"), "batch size for transactions (0 implies transaction are not used)")
@@ -219,8 +216,6 @@ int main(int argc, char ** argv)
                             std::cout << msg.getContent() << std::endl;//TODO: handle map or list messages
                         if (opts.messages && count >= opts.messages) done = true;
                     }
-                } else if (opts.checkRedelivered && !msg.getRedelivered()) {
-                    throw qpid::Exception("duplicate sequence number received, message not marked as redelivered!");
                 }
                 if (opts.tx && (count % opts.tx == 0)) {
                     if (opts.rollbackFrequency && (++txCount % opts.rollbackFrequency == 0)) {
@@ -262,7 +257,7 @@ int main(int argc, char ** argv)
             return 0;
         }
     } catch(const std::exception& error) {
-        std::cerr << "qpid-receive: " << error.what() << std::endl;
+        std::cerr << "Failure: " << error.what() << std::endl;
         connection.close();
         return 1;
     }

Modified: qpid/branches/QPID-2519/cpp/src/tests/qpid-send.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/QPID-2519/cpp/src/tests/qpid-send.cpp?rev=1187150&r1=1187149&r2=1187150&view=diff
==============================================================================
--- qpid/branches/QPID-2519/cpp/src/tests/qpid-send.cpp (original)
+++ qpid/branches/QPID-2519/cpp/src/tests/qpid-send.cpp Fri Oct 21 01:19:00 2011
@@ -28,7 +28,6 @@
 #include <qpid/messaging/FailoverUpdates.h>
 #include <qpid/sys/Time.h>
 #include <qpid/sys/Monitor.h>
-#include <qpid/sys/SystemInfo.h>
 #include "TestOptions.h"
 #include "Statistics.h"
 
@@ -77,11 +76,6 @@ struct Options : public qpid::Options
     uint flowControl;
     bool sequence;
     bool timestamp;
-    std::string groupKey;
-    std::string groupPrefix;
-    uint groupSize;
-    bool groupRandSize;
-    uint groupInterleave;
 
     Options(const std::string& argv0=std::string())
         : qpid::Options("Options"),
@@ -106,23 +100,19 @@ struct Options : public qpid::Options
           sendRate(0),
           flowControl(0),
           sequence(true),
-          timestamp(true),
-          groupPrefix("GROUP-"),
-          groupSize(10),
-          groupRandSize(false),
-          groupInterleave(1)
+          timestamp(true)
     {
         addOptions()
             ("broker,b", qpid::optValue(url, "URL"), "url of broker to connect to")
-            ("address,a", qpid::optValue(address, "ADDRESS"), "address to send to")
+            ("address,a", qpid::optValue(address, "ADDRESS"), "address to drain from")
             ("connection-options", qpid::optValue(connectionOptions, "OPTIONS"), "options for the connection")
             ("messages,m", qpid::optValue(messages, "N"), "stop after N messages have been sent, 0 means no limit")
             ("id,i", qpid::optValue(id, "ID"), "use the supplied id instead of generating one")
             ("reply-to", qpid::optValue(replyto, "REPLY-TO"), "specify reply-to address")
             ("send-eos", qpid::optValue(sendEos, "N"), "Send N EOS messages to mark end of input")
             ("durable", qpid::optValue(durable, "yes|no"), "Mark messages as durable.")
-            ("ttl", qpid::optValue(ttl, "msecs"), "Time-to-live for messages, in milliseconds")
-            ("priority", qpid::optValue(priority, "PRIORITY"), "Priority for messages (higher value implies higher priority)")
+	    ("ttl", qpid::optValue(ttl, "msecs"), "Time-to-live for messages, in milliseconds")
+	    ("priority", qpid::optValue(priority, "PRIORITY"), "Priority for messages (higher value implies higher priority)")
             ("property,P", qpid::optValue(properties, "NAME=VALUE"), "specify message property")
             ("correlation-id", qpid::optValue(correlationid, "ID"), "correlation-id for message")
             ("user-id", qpid::optValue(userid, "USERID"), "userid for message")
@@ -141,11 +131,6 @@ struct Options : public qpid::Options
             ("flow-control", qpid::optValue(flowControl,"N"), "Do end to end flow control to limit queue depth to 2*N. 0 means no flow control.")
             ("sequence", qpid::optValue(sequence, "yes|no"), "Add a sequence number messages property (required for duplicate/lost message detection)")
             ("timestamp", qpid::optValue(timestamp, "yes|no"), "Add a time stamp messages property (required for latency measurement)")
-            ("group-key", qpid::optValue(groupKey, "KEY"), "Generate groups of messages using message header 'KEY' to hold the group identifier")
-            ("group-prefix", qpid::optValue(groupPrefix, "STRING"), "Generate group identifers with 'STRING' prefix (if group-key specified)")
-            ("group-size", qpid::optValue(groupSize, "N"), "Number of messages per a group (if group-key specified)")
-            ("group-randomize-size", qpid::optValue(groupRandSize), "Randomize the number of messages per group to [1...group-size] (if group-key specified)")
-            ("group-interleave", qpid::optValue(groupInterleave, "N"), "Simultaineously interleave messages from N different groups (if group-key specified)")
             ("help", qpid::optValue(help), "print this usage statement");
         add(log);
     }
@@ -267,68 +252,6 @@ class MapContentGenerator   : public Con
     const Options& opts;
 };
 
-// tag each generated message with a group identifer
-//
-class GroupGenerator {
-public:
-    GroupGenerator(const std::string& key,
-                   const std::string& prefix,
-                   const uint size,
-                   const bool randomize,
-                   const uint interleave)
-        : groupKey(key), groupPrefix(prefix), groupSize(size),
-          randomizeSize(randomize), groupSuffix(0)
-    {
-        if (randomize) srand((unsigned int)qpid::sys::SystemInfo::getProcessId());
-
-        for (uint i = 0; i < 1 || i < interleave; ++i) {
-            newGroup();
-        }
-        current = groups.begin();
-    }
-
-    void setGroupInfo(Message &msg)
-    {
-        if (current == groups.end())
-            current = groups.begin();
-        msg.getProperties()[groupKey] = current->id;
-        // std::cout << "SENDING GROUPID=[" << current->id << "]" << std::endl;
-        if (++(current->count) == current->size) {
-            newGroup();
-            groups.erase(current++);
-        } else
-            ++current;
-    }
-
-  private:
-    const std::string& groupKey;
-    const std::string& groupPrefix;
-    const uint groupSize;
-    const bool randomizeSize;
-
-    uint groupSuffix;
-
-    struct GroupState {
-        std::string id;
-        const uint size;
-        uint count;
-        GroupState( const std::string& i, const uint s )
-            : id(i), size(s), count(0) {}
-    };
-    typedef std::list<GroupState> GroupList;
-    GroupList groups;
-    GroupList::iterator current;
-
-    void newGroup() {
-        std::ostringstream groupId(groupPrefix, ios_base::out|ios_base::ate);
-        groupId << groupSuffix++;
-        uint size = (randomizeSize) ? (rand() % groupSize) + 1 : groupSize;
-        // std::cout << "New group: GROUPID=[" << groupId.str() << "] size=" << size << std::endl;
-        GroupState group( groupId.str(), size );
-        groups.push_back( group );
-    }
-};
-
 int main(int argc, char ** argv)
 {
     Connection connection;
@@ -373,14 +296,6 @@ int main(int argc, char ** argv)
             else
                 contentGen.reset(new FixedContentGenerator(opts.contentString));
 
-            std::auto_ptr<GroupGenerator> groupGen;
-            if (!opts.groupKey.empty())
-                groupGen.reset(new GroupGenerator(opts.groupKey,
-                                                  opts.groupPrefix,
-                                                  opts.groupSize,
-                                                  opts.groupRandSize,
-                                                  opts.groupInterleave));
-
             qpid::sys::AbsTime start = qpid::sys::now();
             int64_t interval = 0;
             if (opts.sendRate) interval = qpid::sys::TIME_SEC/opts.sendRate;
@@ -397,6 +312,9 @@ int main(int argc, char ** argv)
                 ++sent;
                 if (opts.sequence)
                     msg.getProperties()[SN] = sent;
+                if (opts.timestamp)
+                    msg.getProperties()[TS] = int64_t(
+                        qpid::sys::Duration(qpid::sys::EPOCH, qpid::sys::now()));
                 if (opts.flowControl) {
                     if ((sent % opts.flowControl) == 0) {
                         msg.setReplyTo(flowControlAddress);
@@ -405,12 +323,6 @@ int main(int argc, char ** argv)
                     else
                         msg.setReplyTo(Address()); // Clear the reply address.
                 }
-                if (groupGen.get())
-                    groupGen->setGroupInfo(msg);
-
-                if (opts.timestamp)
-                    msg.getProperties()[TS] = int64_t(
-                        qpid::sys::Duration(qpid::sys::EPOCH, qpid::sys::now()));
                 sender.send(msg);
                 reporter.message(msg);
 
@@ -456,7 +368,7 @@ int main(int argc, char ** argv)
             return 0;
         }
     } catch(const std::exception& error) {
-        std::cerr << "qpid-send: " << error.what() << std::endl;
+        std::cout << "Failed: " << error.what() << std::endl;
         connection.close();
         return 1;
     }

Modified: qpid/branches/QPID-2519/cpp/src/tests/replication_test
URL: http://svn.apache.org/viewvc/qpid/branches/QPID-2519/cpp/src/tests/replication_test?rev=1187150&r1=1187149&r2=1187150&view=diff
==============================================================================
--- qpid/branches/QPID-2519/cpp/src/tests/replication_test (original)
+++ qpid/branches/QPID-2519/cpp/src/tests/replication_test Fri Oct 21 01:19:00 2011
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 #
 # Licensed to the Apache Software Foundation (ASF) under one

Modified: qpid/branches/QPID-2519/cpp/src/tests/run_acl_tests
URL: http://svn.apache.org/viewvc/qpid/branches/QPID-2519/cpp/src/tests/run_acl_tests?rev=1187150&r1=1187149&r2=1187150&view=diff
==============================================================================
--- qpid/branches/QPID-2519/cpp/src/tests/run_acl_tests (original)
+++ qpid/branches/QPID-2519/cpp/src/tests/run_acl_tests Fri Oct 21 01:19:00 2011
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 #
 # Licensed to the Apache Software Foundation (ASF) under one

Modified: qpid/branches/QPID-2519/cpp/src/tests/run_cli_tests
URL: http://svn.apache.org/viewvc/qpid/branches/QPID-2519/cpp/src/tests/run_cli_tests?rev=1187150&r1=1187149&r2=1187150&view=diff
==============================================================================
--- qpid/branches/QPID-2519/cpp/src/tests/run_cli_tests (original)
+++ qpid/branches/QPID-2519/cpp/src/tests/run_cli_tests Fri Oct 21 01:19:00 2011
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 #
 # Licensed to the Apache Software Foundation (ASF) under one
@@ -70,8 +70,7 @@ stop_brokers() {
 if test -d ${PYTHON_DIR} ;  then
     start_brokers
     echo "Running CLI tests using brokers on ports $LOCAL_PORT $REMOTE_PORT"
-    PYTHON_TESTS=${PYTHON_TESTS:-$*}
-    $QPID_PYTHON_TEST -m cli_tests -b localhost:$LOCAL_PORT -Dremote-port=$REMOTE_PORT -Dcli-dir=$CLI_DIR $targs $PYTHON_TESTS $@
+    $QPID_PYTHON_TEST -m cli_tests -b localhost:$LOCAL_PORT -Dremote-port=$REMOTE_PORT -Dcli-dir=$CLI_DIR $targs $@
     RETCODE=$?
     stop_brokers
     if test x$RETCODE != x0; then 

Modified: qpid/branches/QPID-2519/cpp/src/tests/run_federation_tests
URL: http://svn.apache.org/viewvc/qpid/branches/QPID-2519/cpp/src/tests/run_federation_tests?rev=1187150&r1=1187149&r2=1187150&view=diff
==============================================================================
--- qpid/branches/QPID-2519/cpp/src/tests/run_federation_tests (original)
+++ qpid/branches/QPID-2519/cpp/src/tests/run_federation_tests Fri Oct 21 01:19:00 2011
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 #
 # Licensed to the Apache Software Foundation (ASF) under one
@@ -55,7 +55,7 @@ stop_brokers() {
 if test -d ${PYTHON_DIR} ;  then
     start_brokers
     echo "Running federation tests using brokers on ports $LOCAL_PORT $REMOTE_PORT $REMOTE_B1 $REMOTE_B2"
-    $QPID_PYTHON_TEST -m federation "$SKIPTESTS" -b localhost:$LOCAL_PORT -Dremote-port=$REMOTE_PORT -Dextra-brokers="$REMOTE_B1 $REMOTE_B2" $@
+    $QPID_PYTHON_TEST -m federation $SKIPTESTS -b localhost:$LOCAL_PORT -Dremote-port=$REMOTE_PORT -Dextra-brokers="$REMOTE_B1 $REMOTE_B2" $@
     RETCODE=$?
     stop_brokers
     if test x$RETCODE != x0; then

Modified: qpid/branches/QPID-2519/cpp/src/tests/run_header_test
URL: http://svn.apache.org/viewvc/qpid/branches/QPID-2519/cpp/src/tests/run_header_test?rev=1187150&r1=1187149&r2=1187150&view=diff
==============================================================================
--- qpid/branches/QPID-2519/cpp/src/tests/run_header_test (original)
+++ qpid/branches/QPID-2519/cpp/src/tests/run_header_test Fri Oct 21 01:19:00 2011
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 #
 # Licensed to the Apache Software Foundation (ASF) under one

Modified: qpid/branches/QPID-2519/cpp/src/tests/run_store_tests.ps1
URL: http://svn.apache.org/viewvc/qpid/branches/QPID-2519/cpp/src/tests/run_store_tests.ps1?rev=1187150&r1=1187149&r2=1187150&view=diff
==============================================================================
--- qpid/branches/QPID-2519/cpp/src/tests/run_store_tests.ps1 (original)
+++ qpid/branches/QPID-2519/cpp/src/tests/run_store_tests.ps1 Fri Oct 21 01:19:00 2011
@@ -111,7 +111,7 @@ Invoke-Expression "$prog --quit --port $
 # Test 2... store.py starts/stops/restarts its own brokers
 
 $tests = "*"
-$env:PYTHONPATH="$PYTHON_DIR;$QMF_LIB;$srcdir"
+$env:PYTHONPATH="$PYTHON_DIR;$srcdir"
 $env:QPIDD_EXEC="$prog"
 $env:STORE_LIB="$store_dir\store$suffix.dll"
 if ($test_store -eq "MSSQL") {

Modified: qpid/branches/QPID-2519/cpp/src/tests/run_test
URL: http://svn.apache.org/viewvc/qpid/branches/QPID-2519/cpp/src/tests/run_test?rev=1187150&r1=1187149&r2=1187150&view=diff
==============================================================================
--- qpid/branches/QPID-2519/cpp/src/tests/run_test (original)
+++ qpid/branches/QPID-2519/cpp/src/tests/run_test Fri Oct 21 01:19:00 2011
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file

Modified: qpid/branches/QPID-2519/cpp/src/tests/sasl.mk
URL: http://svn.apache.org/viewvc/qpid/branches/QPID-2519/cpp/src/tests/sasl.mk?rev=1187150&r1=1187149&r2=1187150&view=diff
==============================================================================
--- qpid/branches/QPID-2519/cpp/src/tests/sasl.mk (original)
+++ qpid/branches/QPID-2519/cpp/src/tests/sasl.mk Fri Oct 21 01:19:00 2011
@@ -30,21 +30,9 @@ check_PROGRAMS+=sasl_version
 sasl_version_SOURCES=sasl_version.cpp
 sasl_version_LDADD=$(lib_client)
 
-TESTS += run_cluster_authentication_test sasl_fed sasl_fed_ex_dynamic sasl_fed_ex_link sasl_fed_ex_queue sasl_fed_ex_route sasl_fed_ex_route_cluster sasl_fed_ex_link_cluster sasl_fed_ex_queue_cluster sasl_fed_ex_dynamic_cluster sasl_no_dir
+TESTS += run_cluster_authentication_test sasl_fed sasl_fed_ex
 LONG_TESTS += run_cluster_authentication_soak
-EXTRA_DIST += run_cluster_authentication_test \
-              sasl_fed                        \
-              sasl_fed_ex                     \
-              run_cluster_authentication_soak \
-              sasl_fed_ex_dynamic             \
-              sasl_fed_ex_link                \
-              sasl_fed_ex_queue               \
-              sasl_fed_ex_route               \
-              sasl_fed_ex_dynamic_cluster     \
-              sasl_fed_ex_link_cluster        \
-              sasl_fed_ex_queue_cluster       \
-              sasl_fed_ex_route_cluster       \
-              sasl_no_dir
+EXTRA_DIST += run_cluster_authentication_test sasl_fed sasl_fed_ex run_cluster_authentication_soak
 
 
 endif # HAVE_SASL

Modified: qpid/branches/QPID-2519/cpp/src/tests/sasl_fed
URL: http://svn.apache.org/viewvc/qpid/branches/QPID-2519/cpp/src/tests/sasl_fed?rev=1187150&r1=1187149&r2=1187150&view=diff
==============================================================================
--- qpid/branches/QPID-2519/cpp/src/tests/sasl_fed (original)
+++ qpid/branches/QPID-2519/cpp/src/tests/sasl_fed Fri Oct 21 01:19:00 2011
@@ -123,7 +123,7 @@ n_messages=100
 #--------------------------------------------------
 #echo "  Sending 100 messages to $broker_1_port "
 #--------------------------------------------------
-$builddir/datagen --count $n_messages | $SENDER_EXEC --mechanism DIGEST-MD5 --username zag --password zag --exchange $EXCHANGE_NAME --routing-key $ROUTING_KEY --port $broker_1_port
+$builddir/datagen --count $n_messages | $SENDER_EXEC --username zag --password zag --exchange $EXCHANGE_NAME --routing-key $ROUTING_KEY --port $broker_1_port
 
 sleep 5
 

Modified: qpid/branches/QPID-2519/cpp/src/tests/sasl_fed_ex
URL: http://svn.apache.org/viewvc/qpid/branches/QPID-2519/cpp/src/tests/sasl_fed_ex?rev=1187150&r1=1187149&r2=1187150&view=diff
==============================================================================
--- qpid/branches/QPID-2519/cpp/src/tests/sasl_fed_ex (original)
+++ qpid/branches/QPID-2519/cpp/src/tests/sasl_fed_ex Fri Oct 21 01:19:00 2011
@@ -19,52 +19,22 @@
 # under the License.
 #
 
+
 #===============================================================================
-# These tests create federated links between two brokers using SASL security.
+# This test creates a federated link between two brokers using SASL security.
 # The SASL mechanism used is EXTERNAL, which is satisfied by SSL
 # transport-layer security.
 #===============================================================================
 
 source ./test_env.sh
 
-script_name=`basename $0`
-
-if [ $# -lt 1 ] || [ $# -gt 2 ]
-then
-  echo
-  # These are the four different ways of creating links ( or routes+links ) 
-  # that the qpid-route command provides.
-  echo "Usage: ${script_name} dynamic|link|queue|route [cluster]"
-  echo
-  exit 1
-fi
-
-# Has the user told us to do clustering ? -----------
-clustering_flag=
-if [ $# -eq "2" ] && [ "$2" == "cluster" ]; then
-  clustering_flag=true
-fi
-
-qpid_route_method=$1
-
-# Debugging print. --------------------------
-debug=
-function print {
-  if [ "$debug" ]; then
-    echo "${script_name}: $1"
-  fi
-}
-
-print "=========== start sasl_fed_ex $* ============"
-
-
 
 # This minimum value corresponds to sasl version 2.1.22
 minimum_sasl_version=131350
 
 sasl_version=`$QPID_TEST_EXEC_DIR/sasl_version`
 
-# This test is necessary because this sasl version is the first one that permits 
+# This test is necessary becasue this sasl version is the first one that permits 
 # redirection of the sasl config file path.
 if [ "$sasl_version" -lt  "$minimum_sasl_version" ]; then
   echo "sasl_fed: must have sasl version 2.1.22 or greater.  ( Integer value: $minimum_sasl_version )  Version is: $sasl_version"
@@ -90,7 +60,6 @@ create_certs() {
 
 delete_certs() {
     if [[ -e ${CERT_DIR} ]] ;  then
-        print "removing cert dir ${CERT_DIR}"
         rm -rf ${CERT_DIR}
     fi
 }
@@ -103,40 +72,22 @@ if [[ !(-x $CERTUTIL) ]] ; then
 fi
 
 delete_certs
-create_certs 2> /dev/null
-if [ ! $? ]; then
-  error "Could not create test certificate"
-  exit 1
-fi
+create_certs || error "Could not create test certificate"
+
 
-sasl_config_dir=$builddir/sasl_config
+sasl_config_file=$builddir/sasl_config
 
-tmp_root=${builddir}/sasl_fed_ex_temp
-print "results dir is ${tmp_root}"
-rm -rf ${tmp_root}
+my_random_number=$RANDOM
+tmp_root=/tmp/sasl_fed_$my_random_number
 mkdir -p $tmp_root
 
 SRC_SSL_PORT=6667
 DST_SSL_PORT=6666
 
-SRC_SSL_PORT_2=6668
-DST_SSL_PORT_2=6669
-
 SRC_TCP_PORT=5801
 DST_TCP_PORT=5807
 
-SRC_TCP_PORT_2=5802
-DST_TCP_PORT_2=5803
-
-CLUSTER_NAME_SUFFIX=`hostname | tr '.' ' ' | awk '{print $1}'`
-CLUSTER_1_NAME=sasl_fed_ex_cluster_1_${CLUSTER_NAME_SUFFIX}
-CLUSTER_2_NAME=sasl_fed_ex_cluster_2_${CLUSTER_NAME_SUFFIX}
-
-print "CLUSTER_1_NAME == ${CLUSTER_1_NAME}"
-print "CLUSTER_2_NAME == ${CLUSTER_2_NAME}"
-
-SSL_LIB=${moduledir}/ssl.so
-CLUSTER_LIB=${moduledir}/cluster.so
+SSL_LIB=../.libs/ssl.so
 
 export QPID_SSL_CERT_NAME=${TEST_HOSTNAME}
 
@@ -165,112 +116,52 @@ export QPID_SSL_CERT_NAME=${TEST_HOSTNAM
 #  5. DST pulls messages off the temp queue on SRC to itself.
 #
 
-COMMON_BROKER_OPTIONS="                          \
-      --ssl-sasl-no-dict                         \
-      --sasl-config=$sasl_config_dir             \
-      --ssl-require-client-authentication        \
-      --auth yes                                 \
-      --ssl-cert-db $CERT_DIR                    \
-      --ssl-cert-password-file $CERT_PW_FILE     \
-      --ssl-cert-name $TEST_HOSTNAME             \
-      --no-data-dir                              \
-      --no-module-dir                            \
-      --load-module ${SSL_LIB}                   \
-      --mgmt-enable=yes                          \
-      --log-enable info+                         \
-      --log-source yes                           \
-      --daemon "                                 
-                      
-
-function start_brokers {
-  if [ $1 ]; then
-    # clustered ----------------------------------------
-    print "Starting SRC cluster"
-
-    print "  src broker 1"
-    $QPIDD_EXEC                                  \
-      --port=${SRC_TCP_PORT}                     \
-      --ssl-port ${SRC_SSL_PORT}                 \
-      ${COMMON_BROKER_OPTIONS}                   \
-      --load-module ${CLUSTER_LIB}               \
-      --cluster-name ${CLUSTER_1_NAME}           \
-      --log-to-file $tmp_root/qpidd_src.log 2> /dev/null
-
-    broker_ports[0]=${SRC_TCP_PORT}
-
-    print "  src broker 2"
-    $QPIDD_EXEC                                  \
-      --port=${SRC_TCP_PORT_2}                   \
-      --ssl-port ${SRC_SSL_PORT_2}               \
-      ${COMMON_BROKER_OPTIONS}                   \
-      --load-module ${CLUSTER_LIB}               \
-      --cluster-name ${CLUSTER_1_NAME}           \
-      --log-to-file $tmp_root/qpidd_src_2.log 2> /dev/null
-
-    broker_ports[1]=${SRC_TCP_PORT_2}
-
-
-    print "Starting DST cluster"
-
-    print "  dst broker 1"
-    $QPIDD_EXEC                                  \
-      --port=${DST_TCP_PORT}                     \
-      --ssl-port ${DST_SSL_PORT}                 \
-      ${COMMON_BROKER_OPTIONS}                   \
-      --load-module ${CLUSTER_LIB}               \
-      --cluster-name ${CLUSTER_2_NAME}           \
-      --log-to-file $tmp_root/qpidd_dst.log 2> /dev/null
-
-    broker_ports[2]=${DST_TCP_PORT}
-
-    print "  dst broker 2"
-    $QPIDD_EXEC                                  \
-      --port=${DST_TCP_PORT_2}                   \
-      --ssl-port ${DST_SSL_PORT_2}               \
-      ${COMMON_BROKER_OPTIONS}                   \
-      --load-module ${CLUSTER_LIB}               \
-      --cluster-name ${CLUSTER_2_NAME}           \
-      --log-to-file $tmp_root/qpidd_dst_2.log 2> /dev/null
-
-    broker_ports[3]=${DST_TCP_PORT_2}
-
-  else
-    # vanilla brokers --------------------------------
-    print "Starting SRC broker"
-    $QPIDD_EXEC                                  \
-      --port=${SRC_TCP_PORT}                     \
-      --ssl-port ${SRC_SSL_PORT}                 \
-      ${COMMON_BROKER_OPTIONS}                   \
-      --log-to-file $tmp_root/qpidd_src.log 2> /dev/null
-
-    broker_ports[0]=${SRC_TCP_PORT}
-
-    print "Starting DST broker"
-    $QPIDD_EXEC                                  \
-      --port=${DST_TCP_PORT}                     \
-      --ssl-port ${DST_SSL_PORT}                 \
-      ${COMMON_BROKER_OPTIONS}                   \
-      --log-to-file $tmp_root/qpidd_dst.log 2> /dev/null
-
-    broker_ports[1]=${DST_TCP_PORT}
-  fi
-}
-
-
-function halt_brokers {
-  n_brokers=${#broker_ports[@]}
-  print "Halting ${n_brokers} brokers."
-  for i in $(seq 0 $((${n_brokers} - 1)))
-  do
-    halt_port=${broker_ports[$i]}
-    print "Halting broker $i on port ${halt_port}"
-    $QPIDD_EXEC --port ${halt_port} --quit
-  done
-
-}
 
 
-start_brokers $clustering_flag
+#echo "-----------------------"
+#echo "Starting SRC broker"
+#echo "-----------------------"
+$QPIDD_EXEC                                  \
+  --port=${SRC_TCP_PORT}                     \
+  --ssl-port ${SRC_SSL_PORT}                 \
+  --ssl-sasl-no-dict                         \
+  --sasl-config=$sasl_config_file            \
+  --ssl-require-client-authentication        \
+  --auth yes                                 \
+  --ssl-cert-db $CERT_DIR                    \
+  --ssl-cert-password-file $CERT_PW_FILE     \
+  --ssl-cert-name $TEST_HOSTNAME             \
+  --no-data-dir                              \
+  --no-module-dir                            \
+  --load-module ${SSL_LIB}                   \
+  --mgmt-enable=yes                          \
+  --log-enable info+                         \
+  --log-source yes                           \
+  --daemon                                   \
+  --log-to-file $tmp_root/qpidd_src.log 2> /dev/null
+
+
+#echo "-----------------------"
+#echo "Starting DST broker"
+#echo "-----------------------"
+$QPIDD_EXEC                                  \
+  --port=${DST_TCP_PORT}                     \
+  --ssl-port ${DST_SSL_PORT}                 \
+  --ssl-cert-db $CERT_DIR                    \
+  --ssl-cert-password-file $CERT_PW_FILE     \
+  --ssl-cert-name $TEST_HOSTNAME             \
+  --ssl-sasl-no-dict                         \
+  --ssl-require-client-authentication        \
+  --sasl-config=$sasl_config_file            \
+  --no-data-dir                              \
+  --no-module-dir                            \
+  --load-module ${SSL_LIB}                   \
+  --mgmt-enable=yes                          \
+  --log-enable info+                         \
+  --log-source yes                           \
+  --daemon                                   \
+  $COMMON_BROKER_OPTIONS                     \
+  --log-to-file $tmp_root/qpidd_dst.log 2> /dev/null
 
 
 # I am not randomizing these names, because this test creates its own brokers.
@@ -279,83 +170,76 @@ ROUTING_KEY=sasl_fed_queue
 EXCHANGE_NAME=sasl_fedex
 
 
-print "add exchanges"
+#echo "-----------------------"
+#echo "add exchanges"
+#echo "-----------------------"
 $QPID_CONFIG_EXEC -a localhost:${SRC_TCP_PORT} add exchange direct $EXCHANGE_NAME
 $QPID_CONFIG_EXEC -a localhost:${DST_TCP_PORT} add exchange direct $EXCHANGE_NAME
 
 
-print "add queues"
+#echo "-----------------------"
+#echo "add queues"
+#echo "-----------------------"
 $QPID_CONFIG_EXEC -a localhost:${SRC_TCP_PORT} add queue $QUEUE_NAME
 $QPID_CONFIG_EXEC -a localhost:${DST_TCP_PORT} add queue $QUEUE_NAME
 
 
-print "create bindings"
+#echo "-----------------------"
+#echo "create bindings"
+#echo "-----------------------"
 $QPID_CONFIG_EXEC -a localhost:${SRC_TCP_PORT} bind $EXCHANGE_NAME $QUEUE_NAME $ROUTING_KEY
 $QPID_CONFIG_EXEC -a localhost:${DST_TCP_PORT} bind $EXCHANGE_NAME $QUEUE_NAME $ROUTING_KEY
 
 
-#
+#echo "-----------------------"
+#echo "qpid-route route add"
+#echo "-----------------------"
 # NOTE: The SRC broker *must* be referred to as $TEST_HOSTNAME, and not as "localhost".
 #       It must be referred to by the exact string given as the Common Name (CN) in the cert,
 #       which was created in the function create_certs, above.
+$QPID_ROUTE_EXEC route add localhost:${DST_TCP_PORT}   $TEST_HOSTNAME:${SRC_SSL_PORT} -t ssl $EXCHANGE_NAME $ROUTING_KEY "" "" EXTERNAL
 
+#echo "-----------------------"
+#echo "view the route :"
+#echo "-----------------------"
+#$PYTHON_COMMANDS/qpid-route route list localhost:${DST_TCP_PORT} 
 
+# I don't know how to avoid this sleep yet.  It has to come after route-creation.
+sleep 5
 
-#----------------------------------------------------------------
-# Use qpid-route to create the link, or the link+route, depending
-# on which of its several methods was requested.
-#----------------------------------------------------------------
-if   [ ${qpid_route_method} == "dynamic" ]; then
-  print "dynamic add"
-  $QPID_ROUTE_EXEC -t ssl dynamic add localhost:${DST_TCP_PORT} $TEST_HOSTNAME:${SRC_SSL_PORT} $EXCHANGE_NAME "" "" EXTERNAL
-elif [ ${qpid_route_method} == "link"   ];  then
-  print "link add"
-  $QPID_ROUTE_EXEC -t ssl link add localhost:${DST_TCP_PORT} $TEST_HOSTNAME:${SRC_SSL_PORT}  EXTERNAL
-elif [ ${qpid_route_method} == "queue" ];   then
-  print "queue add"
-  $QPID_ROUTE_EXEC -t ssl queue add localhost:${DST_TCP_PORT}   $TEST_HOSTNAME:${SRC_SSL_PORT} $EXCHANGE_NAME $ROUTING_KEY EXTERNAL
-elif [ ${qpid_route_method} == "route" ];   then
-  print "route add"
-  $QPID_ROUTE_EXEC -t ssl route add localhost:${DST_TCP_PORT}   $TEST_HOSTNAME:${SRC_SSL_PORT} $EXCHANGE_NAME $ROUTING_KEY "" "" EXTERNAL
-else
-  echo "unknown method: |${qpid_route_method}|"
-  echo " choices are: dynamic|link|queue|route "
-  halt_brokers
-  exit 1
-fi
+n_messages=100
 
+./datagen --count ${n_messages} | ./sender --broker localhost --port ${SRC_TCP_PORT} --exchange ${EXCHANGE_NAME} --routing-key ${ROUTING_KEY} --mechanism ANONYMOUS
 
-# I don't know how to avoid this sleep yet.  It has to come after route-creation 
-# to avoid false negatives.
-sleep 5
 
-# This should work the same whether or not we are running a clustered test.
-# In the case of clustered tests, the status is not printed by qpid_route.
-# So in either case, I will look only at the transport field, which should be "ssl".
-print "check the link"
-link_status=$($QPID_ROUTE_EXEC link list localhost:${DST_TCP_PORT} | tail -1 | awk '{print $3}')
-
-halt_brokers
-
-sleep 1
-
-if [ ! ${link_status} ]; then
-  print "link_status is empty"
-  print "result: fail"
-  exit 2
-fi
+#echo "-----------------------"
+#echo "Examine DST Broker"
+#echo "-----------------------"
+dst_message_count=`qpid-stat -q localhost:${DST_TCP_PORT} | grep sasl_fed_queue | awk '{print $2}'`
+
+
+#echo "-----------------------"
+#echo "Asking brokers to quit."
+#echo "-----------------------"
+$QPIDD_EXEC --port ${SRC_TCP_PORT} --quit
+$QPIDD_EXEC --port ${DST_TCP_PORT} --quit
+
 
-if [ ${link_status} == "ssl" ]; then
-  print "result: good"
-  # Only remove the tmp_root on success, to permit debugging.
-  print "Removing temporary directory $tmp_root"
-  rm -rf $tmp_root
+#echo "-----------------------"
+#echo   "Removing temporary directory $tmp_root"
+#echo "-----------------------"
+rm -rf $tmp_root
+
+if [ "$dst_message_count" -eq  "$n_messages" ]; then
+  #echo "good: |$dst_message_count| == |$n_messages|"
   exit 0
+else
+   #echo "not ideal: |$dst_message_count| != |$n_messages|"
+  exit 1
 fi
 
-print "link_status has a bad value: ${link_status}"
-print "result: fail"
-exit 3
+
+
 
 
 

Modified: qpid/branches/QPID-2519/cpp/src/tests/sasl_test_setup.sh
URL: http://svn.apache.org/viewvc/qpid/branches/QPID-2519/cpp/src/tests/sasl_test_setup.sh?rev=1187150&r1=1187149&r2=1187150&view=diff
==============================================================================
--- qpid/branches/QPID-2519/cpp/src/tests/sasl_test_setup.sh (original)
+++ qpid/branches/QPID-2519/cpp/src/tests/sasl_test_setup.sh Fri Oct 21 01:19:00 2011
@@ -30,7 +30,6 @@ pwcheck_method: auxprop
 auxprop_plugin: sasldb
 sasldb_path: $PWD/sasl_config/qpidd.sasldb
 sql_select: dummy select
-mech_list: ANONYMOUS PLAIN DIGEST-MD5 EXTERNAL
 EOF
 
 # Populate temporary sasl db.

Modified: qpid/branches/QPID-2519/cpp/src/tests/sender.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/QPID-2519/cpp/src/tests/sender.cpp?rev=1187150&r1=1187149&r2=1187150&view=diff
==============================================================================
--- qpid/branches/QPID-2519/cpp/src/tests/sender.cpp (original)
+++ qpid/branches/QPID-2519/cpp/src/tests/sender.cpp Fri Oct 21 01:19:00 2011
@@ -120,7 +120,7 @@ void Sender::execute(AsyncSession& sessi
     string data;
     while (getline(std::cin, data)) {
         message.setData(data);
-        //message.getHeaders().setInt("SN", ++sent);
+        message.getHeaders().setInt("SN", ++sent);
         string matchKey;
         if (lvqMatchValues && getline(lvqMatchValues, matchKey)) {
             message.getHeaders().setString(QueueOptions::strLVQMatchProperty, matchKey);

Modified: qpid/branches/QPID-2519/cpp/src/tests/ssl_test
URL: http://svn.apache.org/viewvc/qpid/branches/QPID-2519/cpp/src/tests/ssl_test?rev=1187150&r1=1187149&r2=1187150&view=diff
==============================================================================
--- qpid/branches/QPID-2519/cpp/src/tests/ssl_test (original)
+++ qpid/branches/QPID-2519/cpp/src/tests/ssl_test Fri Oct 21 01:19:00 2011
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 #
 # Licensed to the Apache Software Foundation (ASF) under one
@@ -47,13 +47,9 @@ delete_certs() {
     fi
 }
 
-COMMON_OPTS="--daemon --no-data-dir --no-module-dir --config $CONFIG --load-module $SSL_LIB --ssl-cert-db $CERT_DIR --ssl-cert-password-file $CERT_PW_FILE --ssl-cert-name $TEST_HOSTNAME --require-encryption"
+COMMON_OPTS="--daemon --no-data-dir --no-module-dir --auth no --config $CONFIG --load-module $SSL_LIB --ssl-cert-db $CERT_DIR --ssl-cert-password-file $CERT_PW_FILE --ssl-cert-name $TEST_HOSTNAME --require-encryption"
 start_broker() { # $1 = extra opts
-    ../qpidd --transport ssl --port 0 --ssl-port 0 $COMMON_OPTS --auth no $1;
-}
-
-start_authenticating_broker() {
-    ../qpidd --transport ssl --port 0 --ssl-port 0 $COMMON_OPTS --ssl-sasl-no-dict --ssl-require-client-authentication --auth yes;
+    ../qpidd --transport ssl --port 0 --ssl-port 0 $COMMON_OPTS $1;
 }
 
 stop_brokers() {
@@ -97,7 +93,7 @@ test "$MSG" = "hello" || { echo "receive
 
 #### Client Authentication tests
 
-PORT2=`start_authenticating_broker`  || error "Could not start broker"
+PORT2=`start_broker --ssl-require-client-authentication`  || error "Could not start broker"
 echo "Running SSL client authentication test on port $PORT2"
 URL=amqp:ssl:$TEST_HOSTNAME:$PORT2
 
@@ -125,7 +121,7 @@ pick_port() {
     echo $PICK
 }
 ssl_cluster_broker() {		# $1 = port
-    ../qpidd $COMMON_OPTS --auth no --load-module  $CLUSTER_LIB --cluster-name ssl_test.$HOSTNAME.$$ --cluster-url amqp:ssl:$TEST_HOSTNAME:$1 --port 0 --ssl-port $1 --transport ssl > /dev/null
+    ../qpidd $COMMON_OPTS --load-module  $CLUSTER_LIB --cluster-name ssl_test.$HOSTNAME.$$ --cluster-url amqp:ssl:$TEST_HOSTNAME:$1 --port 0 --ssl-port $1 --transport ssl > /dev/null
     # Wait for broker to be ready
     qpid-ping -Pssl -b $TEST_HOSTNAME -qp $1 || { echo "Cannot connect to broker on $1"; exit 1; }
     echo "Running SSL cluster broker on port $1"

Modified: qpid/branches/QPID-2519/cpp/src/tests/windows/DisableWin32ErrorWindows.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/QPID-2519/cpp/src/tests/windows/DisableWin32ErrorWindows.cpp?rev=1187150&r1=1187149&r2=1187150&view=diff
==============================================================================
--- qpid/branches/QPID-2519/cpp/src/tests/windows/DisableWin32ErrorWindows.cpp (original)
+++ qpid/branches/QPID-2519/cpp/src/tests/windows/DisableWin32ErrorWindows.cpp Fri Oct 21 01:19:00 2011
@@ -26,9 +26,7 @@
 // include this file with the executable being built. If the default
 // behaviors are desired, don't include this file in the build.
 
-#if defined(_MSC_VER)
 #include <crtdbg.h>
-#endif
 #include <windows.h>
 #include <iostream>
 
@@ -55,14 +53,12 @@ static redirect_errors_to_stderr block;
 
 redirect_errors_to_stderr::redirect_errors_to_stderr()
 {
-#if defined(_MSC_VER)
     _CrtSetReportMode (_CRT_WARN, _CRTDBG_MODE_FILE);
     _CrtSetReportFile (_CRT_WARN, _CRTDBG_FILE_STDERR);
     _CrtSetReportMode (_CRT_ERROR, _CRTDBG_MODE_FILE);
     _CrtSetReportFile (_CRT_ERROR, _CRTDBG_FILE_STDERR);
     _CrtSetReportMode (_CRT_ASSERT, _CRTDBG_MODE_FILE);
     _CrtSetReportFile (_CRT_ASSERT, _CRTDBG_FILE_STDERR);
-#endif
 
     // Prevent the system from displaying the critical-error-handler
     // and can't-open-file message boxes.

Modified: qpid/branches/QPID-2519/cpp/src/windows/QpiddBroker.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/QPID-2519/cpp/src/windows/QpiddBroker.cpp?rev=1187150&r1=1187149&r2=1187150&view=diff
==============================================================================
--- qpid/branches/QPID-2519/cpp/src/windows/QpiddBroker.cpp (original)
+++ qpid/branches/QPID-2519/cpp/src/windows/QpiddBroker.cpp Fri Oct 21 01:19:00 2011
@@ -21,12 +21,12 @@
 
 #include "config.h"
 #include "qpidd.h"
+#include "SCM.h"
 #include "qpid/Exception.h"
 #include "qpid/Options.h"
 #include "qpid/Plugin.h"
 #include "qpid/sys/IntegerTypes.h"
 #include "qpid/sys/windows/check.h"
-#include "qpid/sys/windows/SCM.h"
 #include "qpid/broker/Broker.h"
 
 #include <iostream>
@@ -147,7 +147,7 @@ NamedSharedMemory<T>::NamedSharedMemory(
     name(n),
     memory(NULL),
     data(0)
-{}
+{};
 
 template <typename T>
 NamedSharedMemory<T>::~NamedSharedMemory() {
@@ -155,7 +155,7 @@ NamedSharedMemory<T>::~NamedSharedMemory
         ::UnmapViewOfFile(data);
     if (memory != NULL)
         ::CloseHandle(memory);
-}
+};
 
 template <typename T>
 T& NamedSharedMemory<T>::create() {
@@ -291,12 +291,12 @@ struct ServiceOptions : public qpid::Opt
           depends("")
     {
         addOptions()
-            ("install", qpid::optValue(install), "Install as service.")
-            ("start-type", qpid::optValue(startType, "auto|demand|disabled"), "Service start type.\nApplied at install time only.")
+            ("install", qpid::optValue(install), "Install as service")
+            ("start-type", qpid::optValue(startType, "auto|demand|disabled"), "Service start type\nApplied at install time only.")
             ("arguments", qpid::optValue(startArgs, "COMMAND LINE ARGS"), "Arguments to pass when service auto-starts")
-            ("account", qpid::optValue(account, "ACCOUNT"), "Account to run as.\nApplied at install time only.")
-            ("password", qpid::optValue(password, "PASSWORD"), "Account password, if needed.\nApplied at install time only.")
-            ("depends", qpid::optValue(depends, "(comma delimited list)"), "Names of services that must start before this service.\nApplied at install time only.")
+            ("account", qpid::optValue(account, "(LocalService)"), "Account to run as, default is LocalService\nApplied at install time only.")
+            ("password", qpid::optValue(password, "PASSWORD"), "Account password, if needed\nApplied at install time only.")
+            ("depends", qpid::optValue(depends, "(comma delimited list)"), "Names of services that must start before this service\nApplied at install time only.")
             ("start", qpid::optValue(start), "Start the service.")
             ("stop", qpid::optValue(stop), "Stop the service.")
             ("uninstall", qpid::optValue(uninstall), "Uninstall the service.");

Modified: qpid/branches/QPID-2519/cpp/src/windows/resources/template-resource.rc
URL: http://svn.apache.org/viewvc/qpid/branches/QPID-2519/cpp/src/windows/resources/template-resource.rc?rev=1187150&r1=1187149&r2=1187150&view=diff
==============================================================================
--- qpid/branches/QPID-2519/cpp/src/windows/resources/template-resource.rc (original)
+++ qpid/branches/QPID-2519/cpp/src/windows/resources/template-resource.rc Fri Oct 21 01:19:00 2011
@@ -24,7 +24,7 @@
 //
 // Generated from the TEXTINCLUDE 2 resource.
 //
-#include "windows.h"
+#include "afxres.h"
 
 /////////////////////////////////////////////////////////////////////////////
 #undef APSTUDIO_READONLY_SYMBOLS

Modified: qpid/branches/QPID-2519/cpp/src/xml.mk
URL: http://svn.apache.org/viewvc/qpid/branches/QPID-2519/cpp/src/xml.mk?rev=1187150&r1=1187149&r2=1187150&view=diff
==============================================================================
--- qpid/branches/QPID-2519/cpp/src/xml.mk (original)
+++ qpid/branches/QPID-2519/cpp/src/xml.mk Fri Oct 21 01:19:00 2011
@@ -16,7 +16,7 @@
 # specific language governing permissions and limitations
 # under the License.
 #
-dmoduleexec_LTLIBRARIES += xml.la
+dmodule_LTLIBRARIES += xml.la
 
 xml_la_SOURCES =  \
 	qpid/xml/XmlExchange.cpp \

Modified: qpid/branches/QPID-2519/cpp/xml/cluster.xml
URL: http://svn.apache.org/viewvc/qpid/branches/QPID-2519/cpp/xml/cluster.xml?rev=1187150&r1=1187149&r2=1187150&view=diff
==============================================================================
--- qpid/branches/QPID-2519/cpp/xml/cluster.xml (original)
+++ qpid/branches/QPID-2519/cpp/xml/cluster.xml Fri Oct 21 01:19:00 2011
@@ -8,9 +8,9 @@
 - 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
@@ -78,6 +78,10 @@
       <field name="left" type="vbin16"/> <!-- packed member-id array -->
     </control>
 
+    <control name="message-expired" code="0x12">
+      <field name="id" type="uint64"/>
+    </control>
+    
     <domain name="error-type" type="uint8" label="Types of error">
       <enum>
 	<choice name="none" value="0"/>
@@ -85,7 +89,7 @@
 	<choice name="connection" value="2"/>
       </enum>
     </domain>
-
+	
     <!-- Check for error consistency across the cluster -->
     <control name="error-check" code="0x14">
       <field name="type" type="error-type"/>
@@ -112,11 +116,6 @@
       <field name="message" type="vbin32"/>
     </control>
 
-    <!-- Update the cluster time -->
-    <control name="clock" code="0x22">
-      <field name="time" type="uint64"/>
-    </control>
-
   </class>
 
   <!-- Controls associated with a specific connection. -->
@@ -150,7 +149,7 @@
 
     <!-- Abort a connection that is sending invalid data. -->
     <control name="abort" code="0x4"/>
-
+    
     <!-- Update controls. Sent to a new broker in joining mode.
 	 A connection is updated as followed:
 	 - send the shadow's management ID in shadow-perpare on the update connection
@@ -184,7 +183,7 @@
       <field name="position" type="sequence-no"/>
       <field name="tag" type="str8"/>
       <field name="id" type="sequence-no"/>
-      <field name="acquired" type="bit"/> <!--If not set, message is on update queue. -->
+      <field name="acquired" type="bit"/>		       <!--If not set, message follows. -->
       <field name="accepted" type="bit"/>
       <field name="cancelled" type="bit"/>
       <field name="completed" type="bit"/>
@@ -193,9 +192,9 @@
       <field name="enqueued" type="bit"/>
       <field name="credit" type="uint32"/>
     </control>
-
+    
     <!-- Tx transaction state. -->
-    <control name="tx-start" code="0x12"/>
+    <control name="tx-start" code="0x12"/> 
     <control name="tx-accept" code="0x13"> <field name="commands" type="sequence-set"/> </control>
     <control name="tx-dequeue" code="0x14"> <field name="queue" type="str8"/> </control>
     <control name="tx-enqueue" code="0x15"> <field name="queue" type="str8"/> </control>
@@ -205,37 +204,13 @@
     </control>
     <control name="tx-end" code="0x17"/>
     <control name="accumulated-ack" code="0x18"> <field name="commands" type="sequence-set"/> </control>
-
+    
     <!-- Consumers in the connection's output task -->
     <control name="output-task" code="0x19">
       <field name="channel" type="uint16"/>
       <field name="name" type="str8"/>
     </control>
 
-    <!-- Dtx transaction state. -->
-    <control name="dtx-start" code="0x1A">
-      <field name="xid" type="str16"/>
-      <field name="ended" type="bit"/>
-      <field name="suspended" type="bit"/>
-      <field name="failed" type="bit"/>
-      <field name="expired" type="bit"/>
-    </control>
-    <control name="dtx-end" code="0x1B"/>
-
-    <control name="dtx-ack" code="0x1C"/>
-
-    <control name="dtx-buffer-ref" code="0x1D">
-      <field name="xid" type="str16"/>
-      <field name="index" type="uint32"/>
-      <field name="suspended" type="bit"/>
-    </control>
-
-    <control name="dtx-work-record" code="0x1E">
-      <field name="xid" type="str16"/>
-      <field name="prepared" type="bit"/>
-      <field name="timeout" type="uint32"/>
-    </control>
-
     <!-- Complete a session state update. -->
     <control name="session-state" code="0x1F">
       <!-- Target session deduced from channel number.  -->
@@ -247,7 +222,6 @@
       <field name="received" type="sequence-no"/>	       <!-- Received up to here (>= expected) -->
       <field name="unknown-completed" type="sequence-set"/>    <!-- Completed but not known to peer. -->
       <field name="received-incomplete" type="sequence-set"/>  <!-- Received and incomplete -->
-      <field name="dtx-selected" type="bit"/>
     </control>
 
     <!-- Complete a shadow connection update. -->
@@ -278,6 +252,10 @@
 
     <!-- Replicate encoded exchanges/queues. -->
     <control name="exchange" code="0x31"><field name="encoded" type="str32"/></control>
+    <control name="queue" code="0x32"><field name="encoded" type="str32"/></control>
+
+    <!-- Set expiry-id for subsequent messages. -->
+    <control name="expiry-id" code="0x33"><field name="expiry-id" type="uint64"/></control>
 
     <!-- Add a listener to a queue -->
     <control name="add-queue-listener" code="0x34">
@@ -304,26 +282,6 @@
       <field name="position" type="uint8"/>
       <field name="count" type="uint8"/>
     </control>
-
-    <!-- Replicate a QueueObserver for a given queue. -->
-    <control name="queue-observer-state" code="0x39">
-      <field name="queue" type="str8"/>
-      <field name="observer-id" type="str8"/>
-      <field name="state" type="map"/>    <!-- "name"=value -->
-    </control>
-
-    <!-- Update the cluster time -->
-    <control name="clock" code="0x40">
-      <field name="time" type="uint64"/>
-    </control>
-
-    <!-- Update a queue's dequeue rate -->
-    <control name="queue-dequeue-since-purge-state" code="0x41">
-      <field name="queue" type="str8"/>
-      <field name="dequeueSincePurge" type="uint32"/>
-    </control>
-
-
   </class>
 
 </amqp>

Modified: qpid/branches/QPID-2519/doc/book/build-book.sh
URL: http://svn.apache.org/viewvc/qpid/branches/QPID-2519/doc/book/build-book.sh?rev=1187150&r1=1187149&r2=1187150&view=diff
==============================================================================
--- qpid/branches/QPID-2519/doc/book/build-book.sh (original)
+++ qpid/branches/QPID-2519/doc/book/build-book.sh Fri Oct 21 01:19:00 2011
@@ -29,12 +29,6 @@
 #
 ########################################################################
 
-# DOCBOOK XSL STYLESHEET LOCATION
-# Fedora, RHEL:
-DOCBOOK_XSL=/usr/share/sgml/docbook/xsl-stylesheets
-# Ubuntu:
-# DOCBOOK_XSL=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh
-
 rm -rf build/$1
 mkdir -p build/$1
 mkdir -p build/$1/html-single
@@ -44,16 +38,16 @@ cp -r src/images build/$1/html-single
 cp -r src/images build/$1/html
 
 # Create single-page .html
-xsltproc --xinclude --stringparam  section.autolabel 1  --stringparam  callout.graphics 0  --stringparam  callout.unicode 0 --stringparam section.label.includes.component.label 1 ${DOCBOOK_XSL}/html/docbook.xsl src/$1.xml >build/$1/html-single/$1.html
+xsltproc --xinclude --stringparam  section.autolabel 1  --stringparam  callout.graphics 0  --stringparam  callout.unicode 0 --stringparam section.label.includes.component.label 1 /usr/share/sgml/docbook/xsl-stylesheets/html/docbook.xsl src/$1.xml >build/$1/html-single/$1.html
 
 # Create chunked .html
 INFILE=$(readlink -f src/$1.xml)
 pushd build/$1/html
-xsltproc --xinclude --stringparam  chunk.section.depth 1  --stringparam  section.autolabel 1  --stringparam  callout.graphics 0  --stringparam  callout.unicode 0 --stringparam section.label.includes.component.label 1 ${DOCBOOK_XSL}/html/chunk.xsl $INFILE
+xsltproc --xinclude --stringparam  chunk.section.depth 1  --stringparam  section.autolabel 1  --stringparam  callout.graphics 0  --stringparam  callout.unicode 0 --stringparam section.label.includes.component.label 1 /usr/share/sgml/docbook/xsl-stylesheets/html/chunk.xsl $INFILE
 popd
 
 # Create the .fo
-xsltproc --xinclude --stringparam  section.autolabel 1  --stringparam  callout.graphics 0  --stringparam  callout.unicode 0 --stringparam section.label.includes.component.label 1 ${DOCBOOK_XSL}/fo/docbook.xsl src/$1.xml >build/$1/pdf/$1.fo
+xsltproc --xinclude --stringparam  section.autolabel 1  --stringparam  callout.graphics 0  --stringparam  callout.unicode 0 --stringparam section.label.includes.component.label 1 /usr/share/sgml/docbook/xsl-stylesheets/fo/docbook.xsl src/$1.xml >build/$1/pdf/$1.fo
 
 # Use Apache FOP to create the PDF
 fop build/$1/pdf/$1.fo build/$1/pdf/$1.pdf

Modified: qpid/branches/QPID-2519/doc/book/src/AMQP-Messaging-Broker-CPP-Book.xml
URL: http://svn.apache.org/viewvc/qpid/branches/QPID-2519/doc/book/src/AMQP-Messaging-Broker-CPP-Book.xml?rev=1187150&r1=1187149&r2=1187150&view=diff
==============================================================================
--- qpid/branches/QPID-2519/doc/book/src/AMQP-Messaging-Broker-CPP-Book.xml (original)
+++ qpid/branches/QPID-2519/doc/book/src/AMQP-Messaging-Broker-CPP-Book.xml Fri Oct 21 01:19:00 2011
@@ -56,10 +56,8 @@
     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="LVQ.xml"/>
     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="queue-state-replication.xml"/>
     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Starting-a-cluster.xml"/>
-    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="producer-flow-control.xml"/>
     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="AMQP-Compatibility.xml"/>
     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Qpid-Interoperability-Documentation.xml"/>
-    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Using-message-groups.xml"/>
 
 </chapter>
 

Modified: qpid/branches/QPID-2519/doc/book/src/AMQP-Messaging-Broker-CPP.xml
URL: http://svn.apache.org/viewvc/qpid/branches/QPID-2519/doc/book/src/AMQP-Messaging-Broker-CPP.xml?rev=1187150&r1=1187149&r2=1187150&view=diff
==============================================================================
--- qpid/branches/QPID-2519/doc/book/src/AMQP-Messaging-Broker-CPP.xml (original)
+++ qpid/branches/QPID-2519/doc/book/src/AMQP-Messaging-Broker-CPP.xml Fri Oct 21 01:19:00 2011
@@ -50,9 +50,7 @@
     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="LVQ.xml"/>
     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="queue-state-replication.xml"/>
     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Starting-a-cluster.xml"/>
-    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ACL.xml"/>
-    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="producer-flow-control.xml"/>
-    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Using-message-groups.xml"/>
+    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ACL.xml"/> 
 </chapter>
  
 



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org