qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ai...@apache.org
Subject svn commit: r824198 [5/9] - in /qpid/branches/java-network-refactor: ./ qpid/cpp/ qpid/cpp/bindings/qmf/ qpid/cpp/bindings/qmf/python/ qpid/cpp/bindings/qmf/ruby/ qpid/cpp/bindings/qmf/tests/ qpid/cpp/boost-1.32-support/ qpid/cpp/etc/ qpid/cpp/examples...
Date Sun, 11 Oct 2009 23:22:20 GMT
Modified: qpid/branches/java-network-refactor/qpid/cpp/src/tests/acl.py
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/cpp/src/tests/acl.py?rev=824198&r1=824197&r2=824198&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/cpp/src/tests/acl.py (original)
+++ qpid/branches/java-network-refactor/qpid/cpp/src/tests/acl.py Sun Oct 11 23:22:08 2009
@@ -220,10 +220,11 @@
         """
         aclf = ACLFile()
         aclf.write('acl deny bob@QPID create queue name=q1 durable=true passive=true\n')
-        aclf.write('acl deny bob@QPID create queue name=q2 exclusive=true\n')
+        aclf.write('acl deny bob@QPID create queue name=q2 exclusive=true policytype=ring\n')
         aclf.write('acl deny bob@QPID access queue name=q3\n')
         aclf.write('acl deny bob@QPID purge queue name=q3\n')
-        aclf.write('acl deny bob@QPID delete queue name=q4\n')                
+        aclf.write('acl deny bob@QPID delete queue name=q4\n')  
+        aclf.write('acl deny bob@QPID create queue name=q5 maxqueuesize=1000 maxqueuecount=100\n')              
         aclf.write('acl allow all all')
         aclf.close()        
         
@@ -241,19 +242,41 @@
             session = self.get_session('bob','bob')
         
         try:
-            session.queue_declare(queue="q2", exclusive=True)
-            self.fail("ACL should deny queue create request with name=q2 exclusive=true");
+            queue_options = {}
+            queue_options["qpid.policy_type"] = "ring" 
+            session.queue_declare(queue="q2", exclusive=True, arguments=queue_options)
+            self.fail("ACL should deny queue create request with name=q2 exclusive=true qpid.policy_type=ring");
         except qpid.session.SessionException, e:
             self.assertEqual(530,e.args[0].error_code) 
             session = self.get_session('bob','bob')
         
         try:
-            session.queue_declare(queue="q2", durable=True)            
+            queue_options = {}
+            queue_options["qpid.policy_type"] = "ring_strict"   
+            session.queue_declare(queue="q2", exclusive=True, arguments=queue_options)            
         except qpid.session.SessionException, e:
             if (530 == e.args[0].error_code):
-                self.fail("ACL should allow queue create request for q2 with any parameter other than exclusive=true");
+                self.fail("ACL should allow queue create request with name=q2 exclusive=true qpid.policy_type=ring_strict");
 
         try:
+            queue_options = {}
+            queue_options["qpid.max_count"] = 200
+            queue_options["qpid.max_size"] = 500  
+            session.queue_declare(queue="q5", exclusive=True, arguments=queue_options)
+            self.fail("ACL should deny queue create request with name=q2, qpid.max_size=500 and qpid.max_count=200");
+        except qpid.session.SessionException, e:
+            self.assertEqual(530,e.args[0].error_code) 
+            session = self.get_session('bob','bob')
+
+        try:
+            queue_options = {}
+            queue_options["qpid.max_count"] = 200
+            queue_options["qpid.max_size"] = 100  
+            session.queue_declare(queue="q2", exclusive=True, arguments=queue_options)
+        except qpid.session.SessionException, e:
+            if (530 == e.args[0].error_code):
+                self.fail("ACL should allow queue create request with name=q2, qpid.max_size=100 and qpid.max_count=200 ");
+        try:
             session.queue_declare(queue="q3", exclusive=True)
             session.queue_declare(queue="q4", durable=True)
         except qpid.session.SessionException, e:
@@ -300,12 +323,13 @@
         """
         aclf = ACLFile()
         aclf.write('acl allow bob@QPID create queue name=q1 durable=true passive=true\n')
-        aclf.write('acl allow bob@QPID create queue name=q2 exclusive=true\n')
+        aclf.write('acl allow bob@QPID create queue name=q2 exclusive=true policytype=ring\n')
         aclf.write('acl allow bob@QPID access queue name=q3\n')
         aclf.write('acl allow bob@QPID purge queue name=q3\n')
         aclf.write('acl allow bob@QPID create queue name=q3\n')                
         aclf.write('acl allow bob@QPID create queue name=q4\n')                
-        aclf.write('acl allow bob@QPID delete queue name=q4\n')                
+        aclf.write('acl allow bob@QPID delete queue name=q4\n')   
+        aclf.write('acl allow bob@QPID create queue name=q5 maxqueuesize=1000 maxqueuecount=100\n')                   
         aclf.write('acl allow guest@QPID all all\n')
         aclf.write('acl deny all all')
         aclf.close()        
@@ -337,10 +361,31 @@
             session = self.get_session('bob','bob')
         
         try:
-            session.queue_declare(queue="q2", exclusive=True)            
+            queue_options = {}
+            queue_options["qpid.max_count"] = 200
+            queue_options["qpid.max_size"] = 500  
+            session.queue_declare(queue="q5", arguments=queue_options)
+            self.fail("ACL should deny queue create request with name=q2 maxqueuesize=500 maxqueuecount=200");
+        except qpid.session.SessionException, e:
+            self.assertEqual(530,e.args[0].error_code) 
+            session = self.get_session('bob','bob')
+
+        try:
+            queue_options = {}
+            queue_options["qpid.max_count"] = 100
+            queue_options["qpid.max_size"] = 500 
+            session.queue_declare(queue="q5", arguments=queue_options)  
         except qpid.session.SessionException, e:
             if (530 == e.args[0].error_code):
-                self.fail("ACL should allow queue create request for q2 with exclusive=true");
+                self.fail("ACL should allow queue create request with name=q2 maxqueuesize=500 maxqueuecount=200");
+
+        try:
+            queue_options = {}
+            queue_options["qpid.policy_type"] = "ring"
+            session.queue_declare(queue="q2", exclusive=True, arguments=queue_options)            
+        except qpid.session.SessionException, e:
+            if (530 == e.args[0].error_code):
+                self.fail("ACL should allow queue create request for q2 with exclusive=true policytype=ring");
 
         try:
             session.queue_declare(queue="q3")
@@ -733,7 +778,7 @@
    # ACL publish tests
    #=====================================
    
-    def test_publish_acl(self):
+    def test_publish_acl_allow_mode(self):
         """
         Test various publish acl
         """
@@ -779,4 +824,61 @@
             session.message_transfer(destination="amq.direct", message=Message(props,"Test"))
         except qpid.session.SessionException, e:
             if (530 == e.args[0].error_code):
-                self.fail("ACL should allow message transfer to exchange amq.direct");
+                self.fail("ACL should allow message transfer to exchange amq.direct with routing key rk2");
+
+
+    def test_publish_acl_deny_mode(self):
+        """
+        Test various publish acl
+        """
+        aclf = ACLFile()
+        aclf.write('acl allow bob@QPID publish exchange name=amq.direct routingkey=rk1\n')
+        aclf.write('acl allow bob@QPID publish exchange name=amq.topic\n')
+        aclf.write('acl allow bob@QPID publish exchange name=myEx routingkey=rk2\n')
+        aclf.write('acl allow bob@QPID create exchange\n')    
+        aclf.write('acl allow guest@QPID all all \n')    
+        aclf.write('acl deny all all')
+        aclf.close()        
+        
+        result = self.reload_acl()
+        if (result.text.find("format error",0,len(result.text)) != -1):
+            self.fail(result)        
+        
+        session = self.get_session('bob','bob')
+            
+        props = session.delivery_properties(routing_key="rk2")
+               
+        try:            
+            session.message_transfer(destination="amq.direct", message=Message(props,"Test"))
+            self.fail("ACL should deny message transfer to name=amq.direct routingkey=rk2");
+        except qpid.session.SessionException, e:
+            self.assertEqual(530,e.args[0].error_code)
+            session = self.get_session('bob','bob')                        
+            
+        try:
+            session.message_transfer(destination="amq.topic", message=Message(props,"Test"))
+        except qpid.session.SessionException, e:
+            if (530 == e.args[0].error_code):
+                self.fail("ACL should allow message transfer to exchange amq.topic with any routing key");               
+                        
+        try:
+            session.exchange_declare(exchange='myEx', type='direct', durable=False)
+            session.message_transfer(destination="myEx", message=Message(props,"Test"))
+        except qpid.session.SessionException, e:
+            if (530 == e.args[0].error_code):
+                self.fail("ACL should allow message transfer to exchange myEx with routing key=rk2");               
+                        
+        props = session.delivery_properties(routing_key="rk1")
+
+        try:
+            session.message_transfer(destination="myEx", message=Message(props,"Test"))
+            self.fail("ACL should deny message transfer to name=myEx routingkey=rk1");
+        except qpid.session.SessionException, e:
+            self.assertEqual(530,e.args[0].error_code)
+            session = self.get_session('bob','bob')                                                
+
+        try:
+            session.message_transfer(destination="amq.direct", message=Message(props,"Test"))
+        except qpid.session.SessionException, e:
+            if (530 == e.args[0].error_code):
+                self.fail("ACL should allow message transfer to exchange amq.direct with routing key rk1");

Modified: qpid/branches/java-network-refactor/qpid/cpp/src/tests/ais_check
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/cpp/src/tests/ais_check?rev=824198&r1=824197&r2=824198&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/cpp/src/tests/ais_check (original)
+++ qpid/branches/java-network-refactor/qpid/cpp/src/tests/ais_check Sun Oct 11 23:22:08 2009
@@ -21,35 +21,14 @@
 srcdir=`dirname $0`
 
 # Check AIS requirements and run tests if found.
-id -nG | grep '\<ais\>' >/dev/null || \
-    NOGROUP="You are not a member of the ais group."
-ps -u root | grep 'aisexec\|corosync' >/dev/null || \
-    NOAISEXEC="The aisexec or corosync daemon is not running as root"
-
-if test -n "$NOGROUP" -o -n "$NOAISEXEC"; then
-    cat <<EOF
-
-    =========== WARNING: NOT RUNNING AIS TESTS ==============
-
-    Tests that depend on the openais library (used for clustering)
-    will not be run because:
-    $NOGROUP
-    $NOAISEXEC
-
-    ==========================================================
-    
-EOF
+ps -u root | grep 'aisexec\|corosync' >/dev/null || {
+    echo WARNING: Skipping cluster tests, the aisexec or corosync daemon is not running.
     exit 0;			# A warning, not a failure.
-fi
+}
 
-# Execute command with the ais group set.
+# Execute command with the ais group set if user is a member.
 with_ais_group() {
-    id -nG | grep '\<ais\>' >/dev/null || { echo "You are not a member of the ais group."; exit 1; }
-    echo $* | newgrp ais
+    if id -nG | grep '\<ais\>' >/dev/null; then sg ais -c "$*"
+    else "$@"
+    fi
 }
-
-# Run the tests
-srcdir=`dirname $0`
-with_ais_group $srcdir/run_test ./cluster_test || ERROR=1
-exit $ERROR
-

Modified: qpid/branches/java-network-refactor/qpid/cpp/src/tests/background.ps1
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/cpp/src/tests/background.ps1?rev=824198&r1=824197&r2=824198&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/cpp/src/tests/background.ps1 (original)
+++ qpid/branches/java-network-refactor/qpid/cpp/src/tests/background.ps1 Sun Oct 11 23:22:08 2009
@@ -30,11 +30,26 @@
 $encodedScript = [convert]::ToBase64String(
     [Text.Encoding]::Unicode.GetBytes([string] $script))
 
-$p = new-object System.Diagnostics.Process
+#$p = new-object System.Diagnostics.Process
 $si = new-object System.Diagnostics.ProcessStartInfo
 $si.WorkingDirectory = $pwd
-$si.UseShellExecute = $true
 $si.FileName = (get-command powershell.exe).Definition
 $si.Arguments = "-encodedCommand $encodedScript"
 
-[diagnostics.process]::Start($si)
+###### debugging setup
+#$si.CreateNoWindow = $true
+# UseShellExecute false required for RedirectStandard(Error, Output)
+#$si.UseShellExecute = $false
+#$si.RedirectStandardError = $true
+#$si.RedirectStandardOutput = $true
+######
+$si.UseShellExecute = $true
+
+##### Debugging, instead of the plain Start() above.
+#$output = [io.File]::AppendText("start.out")
+#$error = [io.File]::AppendText("start.err")
+$p = [System.Diagnostics.Process]::Start($si)
+#$output.WriteLine($p.StandardOutput.ReadToEnd())
+#$error.WriteLine($p.StandardError.ReadToEnd())
+#$p.WaitForExit()
+#$output.Close()

Modified: qpid/branches/java-network-refactor/qpid/cpp/src/tests/cluster.mk
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/cpp/src/tests/cluster.mk?rev=824198&r1=824197&r2=824198&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/cpp/src/tests/cluster.mk (original)
+++ qpid/branches/java-network-refactor/qpid/cpp/src/tests/cluster.mk Sun Oct 11 23:22:08 2009
@@ -30,7 +30,8 @@
 
 # ais_check checks pre-requisites for cluster tests and runs them if ok.
 TESTS +=					\
-	ais_check				\
+	run_cluster_test			\
+	cluster_read_credit			\
 	test_watchdog				\
 	run_cluster_tests			\
 	federated_cluster_test			\
@@ -38,6 +39,8 @@
 
 EXTRA_DIST +=					\
 	ais_check				\
+	run_cluster_test			\
+	cluster_read_credit			\
 	test_watchdog				\
 	start_cluster				\
 	stop_cluster				\

Modified: qpid/branches/java-network-refactor/qpid/cpp/src/tests/cluster_test.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/cpp/src/tests/cluster_test.cpp?rev=824198&r1=824197&r2=824198&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/cpp/src/tests/cluster_test.cpp (original)
+++ qpid/branches/java-network-refactor/qpid/cpp/src/tests/cluster_test.cpp Sun Oct 11 23:22:08 2009
@@ -85,6 +85,12 @@
         args += "--no-data-dir";
 }
 
+ClusterFixture::Args prepareArgs(const bool durableFlag = false) {
+    ClusterFixture::Args args;
+    prepareArgs(args, durableFlag);
+    return args;
+}
+
 // Timeout for tests that wait for messages
 const sys::Duration TIMEOUT=sys::TIME_SEC/4;
 
@@ -596,16 +602,19 @@
     }
 }
 
-QPID_AUTO_TEST_CASE(testCatchupSharedState) {
+// Test that message data and delivery properties are updated properly.
+QPID_AUTO_TEST_CASE(testUpdateMessages) {
     ClusterFixture::Args args;
     prepareArgs(args, durableFlag);
     ClusterFixture cluster(1, args, -1);
     Client c0(cluster[0], "c0");
 
-    // Create some shared state.
+    // Create messages with different delivery properties
     c0.session.queueDeclare("q", arg::durable=durableFlag);
+    c0.session.exchangeBind(arg::exchange="amq.fanout", arg::queue="q");
     c0.session.messageTransfer(arg::content=makeMessage("foo","q", durableFlag));
-    c0.session.messageTransfer(arg::content=makeMessage("bar","q", durableFlag));
+    c0.session.messageTransfer(arg::content=makeMessage("bar","q", durableFlag),
+                               arg::destination="amq.fanout");
 
     while (c0.session.queueQuery("q").getMessageCount() != 2)
         sys::usleep(1000);    // Wait for message to show up on broker 0.
@@ -628,9 +637,12 @@
 
     BOOST_CHECK(c1.subs.get(m, "q", TIMEOUT));
     BOOST_CHECK_EQUAL(m.getData(), "foo");
+    BOOST_CHECK(m.getDeliveryProperties().hasExchange());
     BOOST_CHECK_EQUAL(m.getDeliveryProperties().getExchange(), "");
     BOOST_CHECK(c1.subs.get(m, "q", TIMEOUT));
     BOOST_CHECK_EQUAL(m.getData(), "bar");
+    BOOST_CHECK(m.getDeliveryProperties().hasExchange());
+    BOOST_CHECK_EQUAL(m.getDeliveryProperties().getExchange(), "amq.fanout");
     BOOST_CHECK_EQUAL(c1.session.queueQuery("q").getMessageCount(), 0u);
 
     // Add another broker, don't wait for join - should be stalled till ready.
@@ -905,6 +917,7 @@
         BOOST_CHECK(!result.getDurable());
         BOOST_CHECK_EQUAL(result.getAlternateExchange(), std::string("amq.fanout"));
         BOOST_CHECK_THROW(c2.session.queueDeclare(arg::queue="q", arg::exclusive=true, arg::passive=true), framing::ResourceLockedException);
+        c1.session.close();
         c1.connection.close();
         c2.session = c2.connection.newSession();
         BOOST_CHECK_THROW(c2.session.queueDeclare(arg::queue="q", arg::passive=true), framing::NotFoundException);
@@ -1100,6 +1113,44 @@
     }
 }
 
-QPID_AUTO_TEST_SUITE_END()
 
+// Browse for 1 message with byte credit, return true if a message was
+// received false if not.
+bool browseByteCredit(Client& c, const string& q, int n, Message& m) {
+    SubscriptionSettings browseSettings(
+        FlowControl(1, n, false), // 1 message, n bytes credit, no window
+        ACCEPT_MODE_NONE,
+        ACQUIRE_MODE_NOT_ACQUIRED,
+        0                       // No auto-ack.
+    );
+    LocalQueue lq;
+    Subscription s = c.subs.subscribe(lq, q, browseSettings);
+    c.session.messageFlush(arg::destination=q, arg::sync=true);
+    c.session.sync();
+    c.subs.getSubscription(q).cancel();
+    return lq.get(m, 0);        // No timeout, flush should push message thru.
+}
+
+// Ensure cluster update preserves exact message size, use byte credt as test.
+QPID_AUTO_TEST_CASE(testExactByteCredit) {
+    ClusterFixture cluster(1, prepareArgs(), -1);
+    Client c0(cluster[0], "c0");
+    c0.session.queueDeclare("q");
+    c0.session.messageTransfer(arg::content=Message("MyMessage", "q"));
+    cluster.add();
+
+    int size=36;                // Size of message on broker: headers+body
+    Client c1(cluster[1], "c1");
+    Message m;
+
+    // Ensure we get the message with exact credit.
+    BOOST_CHECK(browseByteCredit(c0, "q", size, m));
+    BOOST_CHECK(browseByteCredit(c1, "q", size, m));
+    // and not with one byte less.
+    BOOST_CHECK(!browseByteCredit(c0, "q", size-1, m));
+    BOOST_CHECK(!browseByteCredit(c1, "q", size-1, m));
+}
+
+
+QPID_AUTO_TEST_SUITE_END()
 }} // namespace qpid::tests

Modified: qpid/branches/java-network-refactor/qpid/cpp/src/tests/clustered_replication_test
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/cpp/src/tests/clustered_replication_test?rev=824198&r1=824197&r2=824198&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/cpp/src/tests/clustered_replication_test (original)
+++ qpid/branches/java-network-refactor/qpid/cpp/src/tests/clustered_replication_test Sun Oct 11 23:22:08 2009
@@ -22,8 +22,7 @@
 # Test reliability of the replication feature in the face of link
 # failures:
 srcdir=`dirname $0`
-PYTHON_DIR=$srcdir/../../../python
-export PYTHONPATH=$PYTHON_DIR
+. $srcdir/python_env.sh
 
 trap stop_brokers INT EXIT
 
@@ -31,10 +30,6 @@
     echo $1
     exit 1
 }
-with_ais_group() {
-    id -nG | grep '\<ais\>' >/dev/null || { echo "You are not a member of the ais group." 1>&2; exit 1; }
-    echo $* | newgrp ais
-}
 
 stop_brokers() {
     if [[ $PRIMARY1 ]] ; then
@@ -55,26 +50,8 @@
     fi
 }
 
-if test -d ${PYTHON_DIR}; then
-    id -nG | grep '\<ais\>' >/dev/null || \
-        NOGROUP="You are not a member of the ais group."
-    ps -u root | grep 'aisexec\|corosync' >/dev/null || \
-        NOAISEXEC="The aisexec or corosync daemon is not running as root"
-
-    if test -n "$NOGROUP" -o -n "$NOAISEXEC"; then
-        cat <<EOF
-
-    =========== WARNING: NOT RUNNING AIS TESTS ==============
-
-    Not running cluster replication test because:
-    $NOGROUP
-    $NOAISEXEC
-
-    ==========================================================
-
-EOF
-        exit 0;
-    fi
+if test -d $PYTHON_DIR; then
+    . $srcdir/ais_check
 
     #todo: these cluster names need to be unique to prevent clashes
     PRIMARY_CLUSTER=PRIMARY_$(hostname)_$(pwd)
@@ -89,8 +66,8 @@
     #start first node of primary cluster and set up test queue
     echo Starting primary cluster
     PRIMARY1=$(with_ais_group ../qpidd $GENERAL_OPTS $PRIMARY_OPTS --log-to-file repl.primary.1.tmp) || fail "Could not start node"
-    $PYTHON_DIR/commands/qpid-config -a "localhost:$PRIMARY1" add queue test-queue --generate-queue-events 2
-    $PYTHON_DIR/commands/qpid-config -a "localhost:$PRIMARY1" add queue control-queue --generate-queue-events 1
+    $PYTHON_COMMANDS/qpid-config -a "localhost:$PRIMARY1" add queue test-queue --generate-queue-events 2
+    $PYTHON_COMMANDS/qpid-config -a "localhost:$PRIMARY1" add queue control-queue --generate-queue-events 1
 
     #send 10 messages, consume 5 of them
     for i in `seq 1 10`; do echo Message$i; done | ./sender --port $PRIMARY1
@@ -105,10 +82,10 @@
     DR1=$(with_ais_group ../qpidd $GENERAL_OPTS $DR_OPTS --log-to-file repl.dr.1.tmp)
     DR2=$(with_ais_group ../qpidd $GENERAL_OPTS $DR_OPTS --log-to-file repl.dr.2.tmp)
 
-    $PYTHON_DIR/commands/qpid-config -a "localhost:$DR1" add queue test-queue
-    $PYTHON_DIR/commands/qpid-config -a "localhost:$DR1" add queue control-queue
-    $PYTHON_DIR/commands/qpid-config -a "localhost:$DR1" add exchange replication REPLICATION_EXCHANGE
-    $PYTHON_DIR/commands/qpid-route queue add localhost:$DR2 localhost:$PRIMARY2 REPLICATION_EXCHANGE REPLICATION_QUEUE
+    $PYTHON_COMMANDS/qpid-config -a "localhost:$DR1" add queue test-queue
+    $PYTHON_COMMANDS/qpid-config -a "localhost:$DR1" add queue control-queue
+    $PYTHON_COMMANDS/qpid-config -a "localhost:$DR1" add exchange replication REPLICATION_EXCHANGE
+    $PYTHON_COMMANDS/qpid-route queue add localhost:$DR2 localhost:$PRIMARY2 REPLICATION_EXCHANGE REPLICATION_QUEUE
 
     #send more messages to primary
     for i in `seq 11 20`; do echo Message$i; done | ./sender --port $PRIMARY1 --send-eos 1

Modified: qpid/branches/java-network-refactor/qpid/cpp/src/tests/federated_cluster_test
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/cpp/src/tests/federated_cluster_test?rev=824198&r1=824197&r2=824198&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/cpp/src/tests/federated_cluster_test (original)
+++ qpid/branches/java-network-refactor/qpid/cpp/src/tests/federated_cluster_test Sun Oct 11 23:22:08 2009
@@ -22,7 +22,7 @@
 # Test reliability of the replication feature in the face of link
 # failures:
 srcdir=`dirname $0`
-PYTHON_DIR=$srcdir/../../../python
+. $srcdir/python_env.sh
 
 trap stop_brokers EXIT
 
@@ -61,22 +61,21 @@
 }
 
 setup() {
-    export PYTHONPATH=$PYTHON_DIR
     #create exchange on both cluster and single broker
-    $PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_A" add exchange direct test-exchange
-    $PYTHON_DIR/commands/qpid-config -a "localhost:$NODE_1" add exchange direct test-exchange
+    $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_A" add exchange direct test-exchange
+    $PYTHON_COMMANDS/qpid-config -a "localhost:$NODE_1" add exchange direct test-exchange
 
     #create dynamic routes for test exchange
-    $PYTHON_DIR/commands/qpid-route dynamic add "localhost:$NODE_2" "localhost:$BROKER_A" test-exchange
-    $PYTHON_DIR/commands/qpid-route dynamic add "localhost:$BROKER_A" "localhost:$NODE_2" test-exchange
+    $PYTHON_COMMANDS/qpid-route dynamic add "localhost:$NODE_2" "localhost:$BROKER_A" test-exchange
+    $PYTHON_COMMANDS/qpid-route dynamic add "localhost:$BROKER_A" "localhost:$NODE_2" test-exchange
 
     #create test queue on cluster and bind it to the test exchange
-    $PYTHON_DIR/commands/qpid-config -a "localhost:$NODE_1" add queue test-queue
-    $PYTHON_DIR/commands/qpid-config -a "localhost:$NODE_1" bind test-exchange test-queue to-cluster
+    $PYTHON_COMMANDS/qpid-config -a "localhost:$NODE_1" add queue test-queue
+    $PYTHON_COMMANDS/qpid-config -a "localhost:$NODE_1" bind test-exchange test-queue to-cluster
 
     #create test queue on single broker and bind it to the test exchange
-    $PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_A" add queue test-queue
-    $PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_A" bind test-exchange test-queue from-cluster
+    $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_A" add queue test-queue
+    $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_A" bind test-exchange test-queue from-cluster
 }
 
 run_test_pull_to_cluster_two_consumers() {
@@ -127,25 +126,7 @@
 
 
 if test -d ${PYTHON_DIR}; then
-    id -nG | grep '\<ais\>' >/dev/null || \
-        NOGROUP="You are not a member of the ais group."
-    ps -u root | grep 'aisexec\|corosync' >/dev/null || \
-        NOAISEXEC="The aisexec or corosync daemon is not running as root"
-
-    if test -n "$NOGROUP" -o -n "$NOAISEXEC"; then
-        cat <<EOF
-
-    =========== WARNING: NOT RUNNING AIS TESTS ==============
-
-    Not running federation to cluster test because:
-    $NOGROUP
-    $NOAISEXEC
-
-    ==========================================================
-
-EOF
-        exit 0;
-    fi
+    . $srcdir/ais_check
 
     rm -f fed*.tmp #cleanup any files left from previous run
     start_brokers

Modified: qpid/branches/java-network-refactor/qpid/cpp/src/tests/federated_topic_test
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/cpp/src/tests/federated_topic_test?rev=824198&r1=824197&r2=824198&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/cpp/src/tests/federated_topic_test (original)
+++ qpid/branches/java-network-refactor/qpid/cpp/src/tests/federated_topic_test Sun Oct 11 23:22:08 2009
@@ -43,7 +43,7 @@
 done
 
 MY_DIR=$(dirname $(which $0))
-PYTHON_DIR=${MY_DIR}/../../../python
+. $MY_DIR/python_env.sh
 
 trap stop_brokers EXIT
 
@@ -87,29 +87,28 @@
     BROKER_A="localhost:$PORT_A"
     BROKER_B="localhost:$PORT_B"
     BROKER_C="localhost:$PORT_C"
-    export PYTHONPATH=$PYTHON_DIR
     if (($VERBOSE)); then
         echo "Establishing routes for topic..."
     fi
-    $PYTHON_DIR/commands/qpid-route route add $BROKER_B $BROKER_A amq.topic topic_control B B
-    $PYTHON_DIR/commands/qpid-route route add $BROKER_C $BROKER_B amq.topic topic_control C C
+    $PYTHON_COMMANDS/qpid-route route add $BROKER_B $BROKER_A amq.topic topic_control B B
+    $PYTHON_COMMANDS/qpid-route route add $BROKER_C $BROKER_B amq.topic topic_control C C
     if (($VERBOSE)); then
         echo "linked A->B->C"        
     fi
-    $PYTHON_DIR/commands/qpid-route route add $BROKER_B $BROKER_C amq.topic topic_control B B
-    $PYTHON_DIR/commands/qpid-route route add $BROKER_A $BROKER_B amq.topic topic_control A A
+    $PYTHON_COMMANDS/qpid-route route add $BROKER_B $BROKER_C amq.topic topic_control B B
+    $PYTHON_COMMANDS/qpid-route route add $BROKER_A $BROKER_B amq.topic topic_control A A
     if (($VERBOSE)); then
         echo "linked C->B->A"        
         echo "Establishing routes for response queue..."
     fi
 
-    $PYTHON_DIR/commands/qpid-route route add $BROKER_B $BROKER_C amq.direct response B B 
-    $PYTHON_DIR/commands/qpid-route route add $BROKER_A $BROKER_B amq.direct response A A
+    $PYTHON_COMMANDS/qpid-route route add $BROKER_B $BROKER_C amq.direct response B B
+    $PYTHON_COMMANDS/qpid-route route add $BROKER_A $BROKER_B amq.direct response A A
     if (($VERBOSE)); then
         echo "linked C->B->A"        
         for b in $BROKER_A $BROKER_B $BROKER_C; do 
             echo "Routes for $b"
-            $PYTHON_DIR/commands/qpid-route route list $b
+            $PYTHON_COMMANDS/qpid-route route list $b
         done
     fi
 }

Modified: qpid/branches/java-network-refactor/qpid/cpp/src/tests/python_tests
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/cpp/src/tests/python_tests?rev=824198&r1=824197&r2=824198&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/cpp/src/tests/python_tests (original)
+++ qpid/branches/java-network-refactor/qpid/cpp/src/tests/python_tests Sun Oct 11 23:22:08 2009
@@ -20,14 +20,10 @@
 #
 
 # Run the python tests.
+. `dirname $0`/python_env.sh
 QPID_PORT=${QPID_PORT:-5672}
 PYTHON_TESTS=${PYTHON_TESTS:-$*}
-QPID_PYTHON_DIR=${QPID_PYTHON_DIR:-`dirname $0`/../../../python}
 FAILING=${FAILING:-/dev/null}
 
-if test -d $QPID_PYTHON_DIR; then
-    cd $QPID_PYTHON_DIR
-    ./qpid-python-test -b localhost:$QPID_PORT -I $FAILING $PYTHON_TESTS || { echo "FAIL python tests"; exit 1; }
-else
-    echo "WARNING: No python tests. $QPID_PYTHON_DIR not found."
-fi
+cd $PYTHON_DIR
+python commands/qpid-python-test -b localhost:$QPID_PORT -I $FAILING $PYTHON_TESTS || exit 1

Modified: qpid/branches/java-network-refactor/qpid/cpp/src/tests/qpid_stream.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/cpp/src/tests/qpid_stream.cpp?rev=824198&r1=824197&r2=824198&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/cpp/src/tests/qpid_stream.cpp (original)
+++ qpid/branches/java-network-refactor/qpid/cpp/src/tests/qpid_stream.cpp Sun Oct 11 23:22:08 2009
@@ -34,6 +34,9 @@
 using namespace qpid::messaging;
 using namespace qpid::sys;
 
+namespace qpid {
+namespace tests {
+
 struct Args : public qpid::Options 
 {
     std::string url;
@@ -139,10 +142,14 @@
                           << ", min=" << minLatency 
                           << ", max=" << maxLatency << std::endl;
             }
-        }        
+        }
     }
 };
 
+}} // namespace qpid::tests
+
+using namespace qpid::tests;
+
 int main(int argc, char** argv)
 {
     try {

Modified: qpid/branches/java-network-refactor/qpid/cpp/src/tests/quick_topictest.ps1
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/cpp/src/tests/quick_topictest.ps1?rev=824198&r1=824197&r2=824198&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/cpp/src/tests/quick_topictest.ps1 (original)
+++ qpid/branches/java-network-refactor/qpid/cpp/src/tests/quick_topictest.ps1 Sun Oct 11 23:22:08 2009
@@ -18,12 +18,13 @@
 #
 
 # Quick and quiet topic test for make check.
-$srcdir = Split-Path $myInvocation.ScriptName
-$PsHome\powershell $srcdir\topictest.ps1 -subscribers 2 -messages 2 -batches 1 > topictest.log 2>&1
-if ($LastExitCode != 0) {
-    echo $0 FAILED:
+[string]$me = $myInvocation.InvocationName
+$srcdir = Split-Path $me
+powershell "$srcdir\topictest.ps1" -subscribers 2 -messages 2 -batches 1 > topictest.log 2>&1
+if (!$?) {
+    "$me FAILED:"
     cat topictest.log
     exit $LastExitCode
 }
-rm topictest.log
+Remove-Item topictest.log
 exit 0

Modified: qpid/branches/java-network-refactor/qpid/cpp/src/tests/reliable_replication_test
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/cpp/src/tests/reliable_replication_test?rev=824198&r1=824197&r2=824198&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/cpp/src/tests/reliable_replication_test (original)
+++ qpid/branches/java-network-refactor/qpid/cpp/src/tests/reliable_replication_test Sun Oct 11 23:22:08 2009
@@ -22,7 +22,7 @@
 # Test reliability of the replication feature in the face of link
 # failures:
 MY_DIR=`dirname \`which $0\``
-PYTHON_DIR=${MY_DIR}/../../../python
+. ${MY_DIR}/python_env.sh
 
 trap stop_brokers EXIT
 
@@ -53,12 +53,12 @@
     echo "Testing replication from port $BROKER_A to port $BROKER_B"
     export PYTHONPATH=$PYTHON_DIR
 
-    $PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_B" add exchange replication replication
-    $PYTHON_DIR/commands/qpid-route --ack 500 queue add "localhost:$BROKER_B" "localhost:$BROKER_A" replication replication
+    $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_B" add exchange replication replication
+    $PYTHON_COMMANDS/qpid-route --ack 500 queue add "localhost:$BROKER_B" "localhost:$BROKER_A" replication replication
 
     #create test queue (only replicate enqueues for this test):
-    $PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_A" add queue queue-a --generate-queue-events 1
-    $PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_B" add queue queue-a
+    $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_A" add queue queue-a --generate-queue-events 1
+    $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_B" add queue queue-a
 }
 
 send() {
@@ -72,10 +72,10 @@
 
 bounce_link() {
     echo "Destroying link..."
-    $PYTHON_DIR/commands/qpid-route link del "localhost:$BROKER_B" "localhost:$BROKER_A"
+    $PYTHON_COMMANDS/qpid-route link del "localhost:$BROKER_B" "localhost:$BROKER_A"
     echo "Link destroyed; recreating route..."
     sleep 2
-    $PYTHON_DIR/commands/qpid-route --ack 500 queue add "localhost:$BROKER_B" "localhost:$BROKER_A" replication replication
+    $PYTHON_COMMANDS/qpid-route --ack 500 queue add "localhost:$BROKER_B" "localhost:$BROKER_A" replication replication
     echo "Route re-established"
 }
 

Modified: qpid/branches/java-network-refactor/qpid/cpp/src/tests/replication_test
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/cpp/src/tests/replication_test?rev=824198&r1=824197&r2=824198&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/cpp/src/tests/replication_test (original)
+++ qpid/branches/java-network-refactor/qpid/cpp/src/tests/replication_test Sun Oct 11 23:22:08 2009
@@ -21,7 +21,8 @@
 
 # Run a test of the replication feature
 MY_DIR=`dirname \`which $0\``
-PYTHON_DIR=${MY_DIR}/../../../python
+. `dirname $0`/python_env.sh
+
 trap stop_brokers INT TERM QUIT
 
 stop_brokers() {
@@ -47,21 +48,21 @@
     export PYTHONPATH
     echo "Running replication test between localhost:$BROKER_A and localhost:$BROKER_B"
 
-    $PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_B" add exchange replication replication
-    $PYTHON_DIR/commands/qpid-route --ack 5 queue add "localhost:$BROKER_B" "localhost:$BROKER_A" replication replication
+    $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_B" add exchange replication replication
+    $PYTHON_COMMANDS/qpid-route --ack 5 queue add "localhost:$BROKER_B" "localhost:$BROKER_A" replication replication
 
     #create test queues
 
-    $PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_A" add queue queue-a --generate-queue-events 2
-    $PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_A" add queue queue-b --generate-queue-events 2
-    $PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_A" add queue queue-c --generate-queue-events 1
-    $PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_A" add queue queue-d --generate-queue-events 2
-    $PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_A" add queue queue-e --generate-queue-events 1
-
-    $PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_B" add queue queue-a
-    $PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_B" add queue queue-b
-    $PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_B" add queue queue-c
-    $PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_B" add queue queue-e
+    $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_A" add queue queue-a --generate-queue-events 2
+    $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_A" add queue queue-b --generate-queue-events 2
+    $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_A" add queue queue-c --generate-queue-events 1
+    $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_A" add queue queue-d --generate-queue-events 2
+    $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_A" add queue queue-e --generate-queue-events 1
+
+    $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_B" add queue queue-a
+    $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_B" add queue queue-b
+    $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_B" add queue queue-c
+    $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_B" add queue queue-e
     #queue-d deliberately not declared on DR; this error case should be handled
 
     #publish and consume from test queues on broker A:
@@ -125,13 +126,13 @@
     ../qpidd --daemon --port 0 --no-data-dir --no-module-dir --auth no --load-module ../.libs/replication_exchange.so  --log-enable info+ --log-to-file replication-dest.log  --log-to-stderr 0 > qpidd.port
     BROKER_B=`cat qpidd.port`
 
-    $PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_B" add exchange replication replication
-    $PYTHON_DIR/commands/qpid-route --ack 5 queue add "localhost:$BROKER_B" "localhost:$BROKER_A" replication replication
+    $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_B" add exchange replication replication
+    $PYTHON_COMMANDS/qpid-route --ack 5 queue add "localhost:$BROKER_B" "localhost:$BROKER_A" replication replication
 
-    $PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_A" add queue queue-e --generate-queue-events 2
-    $PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_B" add queue queue-e
-    $PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_A" add queue queue-d --generate-queue-events 1
-    $PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_B" add queue queue-d
+    $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_A" add queue queue-e --generate-queue-events 2
+    $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_B" add queue queue-e
+    $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_A" add queue queue-d --generate-queue-events 1
+    $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_B" add queue queue-d
 
     i=1
     while [ $i -le 10 ]; do
@@ -153,9 +154,9 @@
     ../qpidd --daemon --port 0 --no-data-dir --no-module-dir --auth no --load-module ../.libs/replication_exchange.so  --log-enable info+ --log-to-file replication-dest.log  --log-to-stderr 0 > qpidd.port
     BROKER_B=`cat qpidd.port`
 
-    $PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_B" add queue queue-e
-    $PYTHON_DIR/commands/qpid-config -a "localhost:$BROKER_B" add exchange replication replication
-    $PYTHON_DIR/commands/qpid-route --ack 5 queue add "localhost:$BROKER_B" "localhost:$BROKER_A" replication replication
+    $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_B" add queue queue-e
+    $PYTHON_COMMANDS/qpid-config -a "localhost:$BROKER_B" add exchange replication replication
+    $PYTHON_COMMANDS/qpid-route --ack 5 queue add "localhost:$BROKER_B" "localhost:$BROKER_A" replication replication
     # now send another 15
     i=11
     while [ $i -le 15 ]; do

Modified: qpid/branches/java-network-refactor/qpid/cpp/src/tests/ring_queue_test
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/cpp/src/tests/ring_queue_test?rev=824198&r1=824197&r2=824198&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/cpp/src/tests/ring_queue_test (original)
+++ qpid/branches/java-network-refactor/qpid/cpp/src/tests/ring_queue_test Sun Oct 11 23:22:08 2009
@@ -48,7 +48,7 @@
 
 cleanup() {
     rm -f sender_${QUEUE_NAME}_* receiver_${QUEUE_NAME}_*
-    qpid-config $BROKER_URL add queue $QUEUE_NAME
+    qpid-config $BROKER_URL del queue $QUEUE_NAME --force
 }
 
 log() {
@@ -64,10 +64,11 @@
     if [[ $RECEIVERS -eq 0 ]]; then 
         #queue should have $LIMIT messages on it, but need to send an eos also
         sender --routing-key $QUEUE_NAME --send-eos 1 < /dev/null
-        if [[ $(receiver --queue $QUEUE_NAME --browse | wc -l) -eq $(( $LIMIT - 1)) ]]; then
+        received=$(receiver --queue $QUEUE_NAME --browse | wc -l)
+        if [[ received -eq $(( $LIMIT - 1)) ]]; then
             log "queue contains $LIMIT messages as expected"
         else
-            fail "queue does not contain the expected $LIMIT messages"
+            fail "queue does not contain the expected $LIMIT messages (received $received)"
         fi        
     elif [[ $CONCURRENT -eq 0 ]]; then
         #sum of length of all output files should be equal to $LIMIT - $RECEIVERS (1 eos message each)

Modified: qpid/branches/java-network-refactor/qpid/cpp/src/tests/run_acl_tests
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/cpp/src/tests/run_acl_tests?rev=824198&r1=824197&r2=824198&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/cpp/src/tests/run_acl_tests (original)
+++ qpid/branches/java-network-refactor/qpid/cpp/src/tests/run_acl_tests Sun Oct 11 23:22:08 2009
@@ -20,7 +20,7 @@
 #
 
 # Run the acl tests. $srcdir is set by the Makefile.
-PYTHON_DIR=$srcdir/../../../python
+. `dirname $0`/python_env.sh
 DATA_DIR=`pwd`/data_dir
 
 trap stop_brokers INT TERM QUIT
@@ -55,7 +55,7 @@
     echo "Running acl tests using brokers on ports $LOCAL_PORT"
     PYTHONPATH=$PYTHON_DIR:$srcdir
     export PYTHONPATH
-    $PYTHON_DIR/qpid-python-test -b localhost:$LOCAL_PORT -m acl || EXITCODE=1
+    $PYTHON_COMMANDS/qpid-python-test -b localhost:$LOCAL_PORT -m acl || EXITCODE=1
     stop_brokers || EXITCODE=1
     test_loading_acl_from_absolute_path || EXITCODE=1
     rm -rf $DATA_DIR

Modified: qpid/branches/java-network-refactor/qpid/cpp/src/tests/run_cli_tests
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/cpp/src/tests/run_cli_tests?rev=824198&r1=824197&r2=824198&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/cpp/src/tests/run_cli_tests (original)
+++ qpid/branches/java-network-refactor/qpid/cpp/src/tests/run_cli_tests Sun Oct 11 23:22:08 2009
@@ -21,8 +21,8 @@
 
 # Run the cli-utility tests.
 MY_DIR=`dirname \`which $0\``
-PYTHON_DIR=${MY_DIR}/../../../python
-CLI_DIR=${PYTHON_DIR}/commands
+. `dirname $0`/python_env.sh
+CLI_DIR=$PYTHON_COMMANDS
 
 trap stop_brokers INT TERM QUIT
 
@@ -43,7 +43,7 @@
     echo "Running CLI tests using brokers on ports $LOCAL_PORT $REMOTE_PORT"
     PYTHONPATH=${PYTHON_DIR}:${MY_DIR}
     export PYTHONPATH
-    ${PYTHON_DIR}/qpid-python-test -m cli_tests -b localhost:$LOCAL_PORT -Dremote-port=$REMOTE_PORT -Dcli-dir=$CLI_DIR $@
+    $PYTHON_COMMANDS/qpid-python-test -m cli_tests -b localhost:$LOCAL_PORT -Dremote-port=$REMOTE_PORT -Dcli-dir=$CLI_DIR $@
     RETCODE=$?
     stop_brokers
     if test x$RETCODE != x0; then 

Modified: qpid/branches/java-network-refactor/qpid/cpp/src/tests/run_cluster_tests
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/cpp/src/tests/run_cluster_tests?rev=824198&r1=824197&r2=824198&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/cpp/src/tests/run_cluster_tests (original)
+++ qpid/branches/java-network-refactor/qpid/cpp/src/tests/run_cluster_tests Sun Oct 11 23:22:08 2009
@@ -22,45 +22,21 @@
 # Check that top_builddir and srcdir are set
 # If not, assume local run from test dir
 if [ -z ${top_builddir} -o -z ${srcdir} ]; then
-	srcdir=`pwd`
+	srcdir=`dirname $0`
 	top_builddir=${srcdir}/../../
 fi
 TEST_DIR=${top_builddir}/src/tests
-PYTHON_DIR=${srcdir}/../../../python
+. $srcdir/python_env.sh
 
 if test -z $1; then
-	CLUSTER_TEST="${PYTHON_DIR}/qpid-python-test -m cluster_tests cluster_tests.ShortTests.\*"
+	CLUSTER_TEST="$PYTHON_COMMANDS/qpid-python-test -m cluster_tests cluster_tests.ShortTests.\*"
 else
-	CLUSTER_TEST="${PYTHON_DIR}/qpid-python-test -m cluster_tests cluster_tests.LongTests.\*"
+	CLUSTER_TEST="$PYTHON_COMMANDS/qpid-python-test -m cluster_tests cluster_tests.LongTests.\*"
 	echo "Running $1..."
 fi
 
-
 # Check AIS requirements
-id -nG | grep '\<ais\>' > /dev/null || NOGROUP="You are not a member of the ais group."
-ps -u root | grep 'aisexec\|corosync' > /dev/null || NOAISEXEC="The aisexec or corosync daemon is not running as root."
-if ! test -d ${PYTHON_DIR}; then
-	NO_PYTHON_DIR="PYTHON_DIR=\"${PYTHON_DIR}\" not found or does not exist."
-fi
-
-if test -n "${NOGROUP}" -o -n "${NOAISEXEC}" -o -n "${NO_PYTHON_DIR}"; then
-    cat <<EOF
-
-    ======== WARNING: PYTHON CLUSTER TESTS DISABLED ===========
-
-    Tests that depend on the openais library (used for clustering)
-    and python will not be run because:
-
-    ${NOGROUP}
-    ${NOAISEXEC}
-    ${NO_PYTHON_DIR}
-
-    ===========================================================
-
-EOF
-	exit 0
-fi
-
+. $srcdir/ais_check
 
 # Check XML exchange requirements
 XML_LIB=$srcdir/../.libs/xml.so
@@ -103,7 +79,7 @@
 
 
 # Run the test
-sg ais -c "${CLUSTER_TEST}"
+with_ais_group ${CLUSTER_TEST}
 RETCODE=$?
 
 if test x${RETCODE} != x0; then 
@@ -114,4 +90,4 @@
 # Delete cluster store dir if test was successful.
 rm -rf ${TMP_DATA_DIR}
 
-exit 0
\ No newline at end of file
+exit 0

Modified: qpid/branches/java-network-refactor/qpid/cpp/src/tests/run_failover_soak
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/cpp/src/tests/run_failover_soak?rev=824198&r1=824197&r2=824198&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/cpp/src/tests/run_failover_soak (original)
+++ qpid/branches/java-network-refactor/qpid/cpp/src/tests/run_failover_soak Sun Oct 11 23:22:08 2009
@@ -19,29 +19,7 @@
 # under the License.
 #
 
-# Check AIS requirements and run tests if found.
-id -ng | grep '\<ais\>' >/dev/null || \
-    NOGROUP="The ais group is not your primary group."
-ps -u root | grep 'aisexec\|corosync' >/dev/null || \
-    NOAISEXEC="The aisexec/corosync daemon is not running as root"
-
-if test -n "$NOGROUP" -o -n "$NOAISEXEC"; then
-    cat <<EOF
-
-    =========== WARNING: NOT RUNNING AIS TESTS ==============
-
-    Tests that depend on the openais library (used for clustering)
-    will not be run because:
-
-    $NOGROUP
-    $NOAISEXEC
-
-    ==========================================================
-    
-EOF
-    exit 0;                     # A warning, not a failure.
-fi
-
+. `dirname $0`/ais_check
 
 host=127.0.0.1
 

Modified: qpid/branches/java-network-refactor/qpid/cpp/src/tests/run_federation_tests
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/cpp/src/tests/run_federation_tests?rev=824198&r1=824197&r2=824198&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/cpp/src/tests/run_federation_tests (original)
+++ qpid/branches/java-network-refactor/qpid/cpp/src/tests/run_federation_tests Sun Oct 11 23:22:08 2009
@@ -21,7 +21,7 @@
 
 # Run the federation tests.
 MY_DIR=`dirname \`which $0\``
-PYTHON_DIR=${MY_DIR}/../../../python
+. `dirname $0`/python_env.sh
 
 trap stop_brokers INT TERM QUIT
 
@@ -42,7 +42,7 @@
     echo "Running federation tests using brokers on ports $LOCAL_PORT $REMOTE_PORT"
     PYTHONPATH=${PYTHON_DIR}:${MY_DIR}
     export PYTHONPATH
-    ${PYTHON_DIR}/qpid-python-test -m federation -b localhost:$LOCAL_PORT -Dremote-port=$REMOTE_PORT $@
+    $PYTHON_COMMANDS/qpid-python-test -m federation -b localhost:$LOCAL_PORT -Dremote-port=$REMOTE_PORT $@
     RETCODE=$?
     stop_brokers
     if test x$RETCODE != x0; then 

Modified: qpid/branches/java-network-refactor/qpid/cpp/src/tests/run_federation_tests.ps1
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/cpp/src/tests/run_federation_tests.ps1?rev=824198&r1=824197&r2=824198&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/cpp/src/tests/run_federation_tests.ps1 (original)
+++ qpid/branches/java-network-refactor/qpid/cpp/src/tests/run_federation_tests.ps1 Sun Oct 11 23:22:08 2009
@@ -18,42 +18,63 @@
 #
 
 # Run the federation tests.
-$srcdir = Split-Path $myInvocation.ScriptName
-$PYTHON_DIR = $srcdir\..\..\..\python
 
-trap stop_brokers INT TERM QUIT
+$srcdir = Split-Path $myInvocation.InvocationName
+$PYTHON_DIR = "$srcdir\..\..\..\python"
+if (!(Test-Path $PYTHON_DIR -pathType Container)) {
+    "Skipping federation tests as python libs not found"
+    exit 1
+}
+
+# Test runs from the tests directory but the broker executable is one level
+# up, and most likely in a subdirectory from there based on what build type.
+# Look around for it before trying to start it.
+$subs = "Debug","Release","MinSizeRel","RelWithDebInfo"
+foreach ($sub in $subs) {
+  $prog = "..\$sub\qpidd.exe"
+  if (Test-Path $prog) {
+     break
+  }
+}
+if (!(Test-Path $prog)) {
+    "Cannot locate qpidd.exe"
+    exit 1
+}
+$cmdline = "$prog --auth=no --no-module-dir --port=0 --log-to-file qpidd.log $args | foreach { set-content qpidd.port `$_ }"
+$cmdblock = $executioncontext.invokecommand.NewScriptBlock($cmdline)
 
-start_brokers() {
+function start_brokers {
   # Start 2 brokers, saving the port numbers in LOCAL_PORT, REMOTE_PORT.
-  . $srcdir\background.ps1 {
-    ..\Debug\qpidd --auth=no --no-module-dir --port=0 --log-to-file qpidd.log $args | foreach { set-content qpidd.port $_ } }
+  . $srcdir\background.ps1 $cmdblock
   while (!(Test-Path qpidd.port)) {
     Start-Sleep 2
   }
   set-item -path env:LOCAL_PORT -value (get-content -path qpidd.port -totalcount 1)
   Remove-Item qpidd.port
-  . $srcdir\background.ps1 {
-    ..\Debug\qpidd --auth=no --no-module-dir --port=0 --log-to-file qpidd.log $args | foreach { set-content qpidd.port $_ } }
+  . $srcdir\background.ps1 $cmdblock
   while (!(Test-Path qpidd.port)) {
     Start-Sleep 2
   }
   set-item -path env:REMOTE_PORT -value (get-content -path qpidd.port -totalcount 1)
 }
 
-stop_brokers() {
-   ..\Debug\qpidd -q --port $LOCAL_PORT | Out-Default
-   ..\Debug\qpidd -q --port $REMOTE_PORT | Out-Default
-}
-
-if (Test-Path $PYTHON_DIR -pathType Container) {
-    start_brokers
-    "Running federation tests using brokers on ports $LOCAL_PORT $REMOTE_PORT"
-    $env:PYTHONPATH=$PYTHON_DIR
-    $srcdir/federation.py -v -s $srcdir\..\..\..\specs\amqp.0-10-qpid-errata.xml -b localhost:$LOCAL_PORT --remote-port $REMOTE_PORT $args
-    $RETCODE=$LASTEXITCODE
-    stop_brokers
-    if ($RETCODE != 0) {
-        "FAIL federation tests"
-        exit 1
-    }
+function stop_brokers {
+   Invoke-Expression "$prog -q --port $env:LOCAL_PORT" | Out-Default
+   Invoke-Expression "$prog -q --port $env:REMOTE_PORT" | Out-Default
+}
+
+trap {
+  &stop_brokers
+  break
+}
+
+&start_brokers
+"Running federation tests using brokers on ports $env:LOCAL_PORT $env:REMOTE_PORT"
+$env:PYTHONPATH=$PYTHON_DIR
+python $srcdir/federation.py -v -s $srcdir\..\..\..\specs\amqp.0-10-qpid-errata.xml -b localhost:$env:LOCAL_PORT --remote-port $env:REMOTE_PORT $args
+$RETCODE=$LASTEXITCODE
+&stop_brokers
+if ($RETCODE -ne 0) {
+    "FAIL federation tests"
+    exit 1
 }

Modified: qpid/branches/java-network-refactor/qpid/cpp/src/tests/run_header_test
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/cpp/src/tests/run_header_test?rev=824198&r1=824197&r2=824198&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/cpp/src/tests/run_header_test (original)
+++ qpid/branches/java-network-refactor/qpid/cpp/src/tests/run_header_test Sun Oct 11 23:22:08 2009
@@ -24,7 +24,7 @@
 # in both directions
 
 srcdir=`dirname $0`
-PYTHON_DIR=$srcdir/../../../python
+. `dirname $0`/python_env.sh
 test -f qpidd.port && QPID_PORT=`cat qpidd.port`
 
 if test -d ${PYTHON_DIR} ;  then

Modified: qpid/branches/java-network-refactor/qpid/cpp/src/tests/run_header_test.ps1
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/cpp/src/tests/run_header_test.ps1?rev=824198&r1=824197&r2=824198&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/cpp/src/tests/run_header_test.ps1 (original)
+++ qpid/branches/java-network-refactor/qpid/cpp/src/tests/run_header_test.ps1 Sun Oct 11 23:22:08 2009
@@ -21,20 +21,33 @@
 # TODO: this should be expanded to cover a wider set of types and go
 # in both directions
 
-$srcdir = Split-Path $myInvocation.ScriptName
-$PYTHON_DIR = $srcdir\..\..\..\python
+$srcdir = Split-Path $myInvocation.InvocationName
+$PYTHON_DIR = "$srcdir\..\..\..\python"
+if (!(Test-Path $PYTHON_DIR -pathType Container)) {
+    "Skipping header test as python libs not found"
+    exit 0
+}
+
 if (Test-Path qpidd.port) {
    set-item -path env:QPID_PORT -value (get-content -path qpidd.port -totalcount 1)
 }
 
-if (Test-Path $PYTHON_DIR -pathType Container) {
-    ./header_test -p $QPID_PORT
-    $env:PYTHONPATH="$PYTHON_DIR;$env:PYTHONPATH"
-    $srcdir/header_test.py "localhost" $QPID_PORT
-    exit $LASTEXITCODE
+# Test runs from the tests directory but the test executables are in a
+# subdirectory based on the build type. Look around for it before trying
+# to start it.
+$subs = "Debug","Release","MinSizeRel","RelWithDebInfo"
+foreach ($sub in $subs) {
+  $prog = ".\$sub\header_test.exe"
+  if (Test-Path $prog) {
+     break
+  }
 }
-else {
-    "Skipping header test as python libs not found"
-    exit 0
+if (!(Test-Path $prog)) {
+    "Cannot locate header_test.exe"
+    exit 1
 }
 
+Invoke-Expression "$prog -p $env:QPID_PORT" | Write-Output
+$env:PYTHONPATH="$PYTHON_DIR;$env:PYTHONPATH"
+Invoke-Expression "python $srcdir/header_test.py localhost $env:QPID_PORT" | Write-Output
+exit $LASTEXITCODE

Modified: qpid/branches/java-network-refactor/qpid/cpp/src/tests/run_long_cluster_tests
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/cpp/src/tests/run_long_cluster_tests?rev=824198&r1=824197&r2=824198&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/cpp/src/tests/run_long_cluster_tests (original)
+++ qpid/branches/java-network-refactor/qpid/cpp/src/tests/run_long_cluster_tests Sun Oct 11 23:22:08 2009
@@ -19,4 +19,5 @@
 # under the License.
 #
 
-./run_cluster_tests long_cluster_tests
+srcdir=`dirname $0`
+$srcdir/run_cluster_tests long_cluster_tests

Modified: qpid/branches/java-network-refactor/qpid/cpp/src/tests/run_ring_queue_test
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/cpp/src/tests/run_ring_queue_test?rev=824198&r1=824197&r2=824198&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/cpp/src/tests/run_ring_queue_test (original)
+++ qpid/branches/java-network-refactor/qpid/cpp/src/tests/run_ring_queue_test Sun Oct 11 23:22:08 2009
@@ -22,9 +22,8 @@
 
 #setup path to find qpid-config and sender/receiver test progs
 srcdir=`dirname $0`
-PYTHON_DIR=$srcdir/../../../python
-export PYTHONPATH=$PYTHON_DIR
-export PATH=./:$PYTHON_DIR/commands:$PATH
+. `dirname $0`/python_env.sh
+export PATH=$PWD:$srcdir:$PYTHON_COMMANDS:$PATH
 
 #set port to connect to via env var
 test -s qpidd.port && QPID_PORT=`cat qpidd.port`

Modified: qpid/branches/java-network-refactor/qpid/cpp/src/tests/run_test.ps1
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/cpp/src/tests/run_test.ps1?rev=824198&r1=824197&r2=824198&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/cpp/src/tests/run_test.ps1 (original)
+++ qpid/branches/java-network-refactor/qpid/cpp/src/tests/run_test.ps1 Sun Oct 11 23:22:08 2009
@@ -52,7 +52,6 @@
    set-item -path env:QPID_PORT -value (get-content -path qpidd.port -totalcount 1)
 }
 
-#$p = new-object System.Diagnostics.Process
 $si = new-object System.Diagnostics.ProcessStartInfo
 $si.WorkingDirectory = $pwd
 $si.UseShellExecute = $true
@@ -67,6 +66,6 @@
       $si.Arguments = $args[1..$args.length-1]
    }
 }
-$p = [diagnostics.process]::Start($si)
+$p = [System.Diagnostics.Process]::Start($si)
 $p.WaitForExit()
 exit $?

Modified: qpid/branches/java-network-refactor/qpid/cpp/src/tests/start_broker.ps1
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/cpp/src/tests/start_broker.ps1?rev=824198&r1=824197&r2=824198&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/cpp/src/tests/start_broker.ps1 (original)
+++ qpid/branches/java-network-refactor/qpid/cpp/src/tests/start_broker.ps1 Sun Oct 11 23:22:08 2009
@@ -28,9 +28,26 @@
 if (Test-Path qpidd.port) {
    Remove-Item qpidd.port
 }
+
+# Test runs from the tests directory but the broker executable is one level
+# up, and most likely in a subdirectory from there based on what build type.
+# Look around for it before trying to start it.
+$subs = "Debug","Release","MinSizeRel","RelWithDebInfo"
+foreach ($sub in $subs) {
+  $prog = "..\$sub\qpidd.exe"
+  if (Test-Path $prog) {
+     break
+  }
+}
+if (!(Test-Path $prog)) {
+    "Cannot locate qpidd.exe"
+    exit 1
+}
+$cmdline = "$prog --auth=no --no-module-dir --port=0 --log-to-file qpidd.log $args | foreach { set-content qpidd.port `$_ }"
+$cmdblock = $executioncontext.invokecommand.NewScriptBlock($cmdline)
 $srcdir = Get-ScriptPath
-. $srcdir\background.ps1 {
-  ..\Debug\qpidd --auth=no --no-module-dir --port=0 --log-to-file qpidd.log $args | foreach { set-content qpidd.port $_ } }
+. $srcdir\background.ps1 $cmdblock
+
 $wait_time = 0
 while (!(Test-Path qpidd.port) -and ($wait_time -lt 10)) {
    Start-Sleep 2

Modified: qpid/branches/java-network-refactor/qpid/cpp/src/tests/start_cluster
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/cpp/src/tests/start_cluster?rev=824198&r1=824197&r2=824198&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/cpp/src/tests/start_cluster (original)
+++ qpid/branches/java-network-refactor/qpid/cpp/src/tests/start_cluster Sun Oct 11 23:22:08 2009
@@ -23,20 +23,17 @@
 #
 
 # Execute command with the ais group set.
-with_ais_group() {
-    id -nG | grep '\<ais\>' >/dev/null || { echo "You are not a member of the ais group." 1>&2; exit 1; }
-    echo $* | newgrp ais
-}
+. `dirname $0`/ais_check
 
 rm -f cluster*.log cluster.ports qpidd.port
 
 SIZE=${1:-3}; shift
 CLUSTER=`pwd`		# Cluster name=pwd, avoid clashes.
-OPTS="-d --no-module-dir --load-module ../.libs/cluster.so  --cluster-name=$CLUSTER --auth=no $@"
+OPTS="-d --no-module-dir --load-module ../.libs/cluster.so  --cluster-name=$CLUSTER --auth=no --log-enable notice+ --log-enable debug+:cluster $@"
 
 for (( i=0; i<SIZE; ++i )); do
     DDIR=`mktemp -d /tmp/start_cluster.XXXXXXXXXX`
-    PORT=`with_ais_group ../qpidd  -p0 --log-to-file=cluster$i.log $OPTS  --data-dir=$DDIR`  || exit 1
+    PORT=`with_ais_group ../qpidd  -p0 --log-to-file=cluster$i.log $OPTS --data-dir=$DDIR`  || exit 1
     echo $PORT >> cluster.ports
 done
 

Modified: qpid/branches/java-network-refactor/qpid/cpp/src/tests/stop_broker.ps1
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/cpp/src/tests/stop_broker.ps1?rev=824198&r1=824197&r2=824198&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/cpp/src/tests/stop_broker.ps1 (original)
+++ qpid/branches/java-network-refactor/qpid/cpp/src/tests/stop_broker.ps1 Sun Oct 11 23:22:08 2009
@@ -21,8 +21,23 @@
 Get-Content -path qpidd.port -totalCount 1 | Set-Variable -name qpid_port
 Remove-Item qpidd.port
 
+# Test runs from the tests directory but the broker executable is one level
+# up, and most likely in a subdirectory from there based on what build type.
+# Look around for it before trying to start it.
+$subs = "Debug","Release","MinSizeRel","RelWithDebInfo"
+foreach ($sub in $subs) {
+  $prog = "..\$sub\qpidd.exe"
+  if (Test-Path $prog) {
+     break
+  }
+}
+if (!(Test-Path $prog)) {
+    "Cannot locate qpidd.exe"
+    exit 1
+}
+
 # Piping the output makes the script wait for qpidd to finish.
-..\Debug\qpidd --quit --port $qpid_port | Write-Output
+Invoke-Expression "$prog --quit --port $qpid_port" | Write-Output
 $stopped = $?
 
 # Check qpidd.log.

Modified: qpid/branches/java-network-refactor/qpid/cpp/src/tests/test_store.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/cpp/src/tests/test_store.cpp?rev=824198&r1=824197&r2=824198&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/cpp/src/tests/test_store.cpp (original)
+++ qpid/branches/java-network-refactor/qpid/cpp/src/tests/test_store.cpp Sun Oct 11 23:22:08 2009
@@ -140,7 +140,8 @@
     {
         Broker* broker = dynamic_cast<Broker*>(&target);
         if (!broker) return;
-        broker->setStore (new TestStore(options.name, *broker));
+        boost::shared_ptr<MessageStore> p(new TestStore(options.name, *broker));
+        broker->setStore (p);
     }
 
     void initialize(qpid::Plugin::Target&) {}

Modified: qpid/branches/java-network-refactor/qpid/cpp/src/tests/topictest.ps1
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/cpp/src/tests/topictest.ps1?rev=824198&r1=824197&r2=824198&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/cpp/src/tests/topictest.ps1 (original)
+++ qpid/branches/java-network-refactor/qpid/cpp/src/tests/topictest.ps1 Sun Oct 11 23:22:08 2009
@@ -19,9 +19,6 @@
 
 # Run the C++ topic test
 
-# Clean up old log files
-Get-Item subscriber_*.log | Remove-Item
-
 # Parameters with default values: s (subscribers) m (messages) b (batches)
 #                                 h (host) t (false; use transactions)
 param (
@@ -32,23 +29,28 @@
   [switch] $t           # transactional
 )
 
+# Clean up old log files
+Get-Item subscriber_*.log | Remove-Item
+
+if ($t) {
+    $transactional = "--transactional --durable"
+}
+
 function subscribe {
-    "Start subscriber $args[0]"
-    $LOG = "subscriber_$args[0].log"
-    . $srcdir\background.ps1 {
-      $env:OUTDIR\topic_listener $TRANSACTIONAL > $LOG 2>&1
-      if ($LastExitCode -ne 0) { Remove-Item $LOG }
-    } -inconsole
+    param ([int]$num)
+    "Start subscriber $num"
+    $LOG = "subscriber_$num.log"
+    $cmdline = "$env:OUTDIR\topic_listener $transactional > $LOG 2>&1
+                if (`$LastExitCode -ne 0) { Remove-Item $LOG }"
+    $cmdblock = $executioncontext.invokecommand.NewScriptBlock($cmdline)
+    . $srcdir\background.ps1 $cmdblock
 }
 
-publish() {
-    if ($t) {
-      $transactional = "--transactional --durable"
-    }
-    $env:OUTDIR\topic_publisher --messages $messages --batches $batches --subscribers $subscribers $host $transactional 2>&1
+function publish {
+    Invoke-Expression "$env:OUTDIR\topic_publisher --messages $messages --batches $batches --subscribers $subscribers $host $transactional" 2>&1
 }
 
-$srcdir = Split-Path $myInvocation.ScriptName
+$srcdir = Split-Path $MyInvocation.MyCommand.Path
 if ($broker.length) {
   $broker = "-h$broker"
 }

Modified: qpid/branches/java-network-refactor/qpid/cpp/src/tests/windows/DisableWin32ErrorWindows.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/cpp/src/tests/windows/DisableWin32ErrorWindows.cpp?rev=824198&r1=824197&r2=824198&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/cpp/src/tests/windows/DisableWin32ErrorWindows.cpp (original)
+++ qpid/branches/java-network-refactor/qpid/cpp/src/tests/windows/DisableWin32ErrorWindows.cpp Sun Oct 11 23:22:08 2009
@@ -28,9 +28,23 @@
 
 #include <crtdbg.h>
 #include <windows.h>
+#include <iostream>
 
 namespace {
 
+// Instead of popping up a window for exceptions, just print something out
+LONG _stdcall UnhandledExceptionFilter (PEXCEPTION_POINTERS pExceptionInfo)
+{
+    DWORD dwExceptionCode = pExceptionInfo->ExceptionRecord->ExceptionCode;
+
+    if (dwExceptionCode == EXCEPTION_ACCESS_VIOLATION)
+        std::cerr << "\nERROR: ACCESS VIOLATION\n" << std::endl;
+    else
+        std::cerr << "\nERROR: UNHANDLED EXCEPTION\n" << std::endl;
+
+    return EXCEPTION_EXECUTE_HANDLER;
+}
+
 struct redirect_errors_to_stderr {
     redirect_errors_to_stderr ();
 };
@@ -50,6 +64,9 @@
     // and can't-open-file message boxes.
     SetErrorMode(SEM_FAILCRITICALERRORS);
     SetErrorMode(SEM_NOOPENFILEERRORBOX);
+
+    // And this will catch all unhandled exceptions.
+    SetUnhandledExceptionFilter (&UnhandledExceptionFilter);
 }
 
 }  // namespace

Modified: qpid/branches/java-network-refactor/qpid/cpp/src/windows/QpiddBroker.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/cpp/src/windows/QpiddBroker.cpp?rev=824198&r1=824197&r2=824198&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/cpp/src/windows/QpiddBroker.cpp (original)
+++ qpid/branches/java-network-refactor/qpid/cpp/src/windows/QpiddBroker.cpp Sun Oct 11 23:22:08 2009
@@ -133,6 +133,14 @@
     }
 }
 
+// Console control handler to properly handle ctl-c.
+BOOL CtrlHandler(DWORD ctl)
+{
+    ShutdownEvent shutter;     // no pid specified == shut me down
+    shutter.signal();
+    return ((ctl == CTRL_C_EVENT || ctl == CTRL_CLOSE_EVENT) ? TRUE : FALSE);
+}
+
 }
 
 struct ProcessControlOptions : public qpid::Options {
@@ -245,6 +253,7 @@
 
     ShutdownHandler waitShut(brokerPtr);
     qpid::sys::Thread waitThr(waitShut);   // Wait for shutdown event
+    SetConsoleCtrlHandler((PHANDLER_ROUTINE)CtrlHandler, TRUE);
     brokerPtr->run();
     waitShut.signal();   // In case we shut down some other way
     waitThr.join();

Propchange: qpid/branches/java-network-refactor/qpid/dotnet/build-msbuild.bat
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Oct 11 23:22:08 2009
@@ -1,2 +1,2 @@
 /incubator/qpid/trunk/qpid/dotnet/build-msbuild.bat:443187-724917
-/qpid/trunk/qpid/dotnet/build-msbuild.bat:805429-816233
+/qpid/trunk/qpid/dotnet/build-msbuild.bat:805429-824132

Propchange: qpid/branches/java-network-refactor/qpid/dotnet/build-nant-release
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Oct 11 23:22:08 2009
@@ -1,2 +1,2 @@
 /incubator/qpid/trunk/qpid/dotnet/build-nant-release:443187-724917
-/qpid/trunk/qpid/dotnet/build-nant-release:805429-816233
+/qpid/trunk/qpid/dotnet/build-nant-release:805429-824132

Propchange: qpid/branches/java-network-refactor/qpid/dotnet/build-nant.bat
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Oct 11 23:22:08 2009
@@ -1,2 +1,2 @@
 /incubator/qpid/trunk/qpid/dotnet/build-nant.bat:443187-724917
-/qpid/trunk/qpid/dotnet/build-nant.bat:805429-816233
+/qpid/trunk/qpid/dotnet/build-nant.bat:805429-824132

Propchange: qpid/branches/java-network-refactor/qpid/java/broker/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Oct 11 23:22:08 2009
@@ -1,2 +1,2 @@
 /qpid/branches/jmx_mc_gsoc09/qpid/java/broker:787599
-/qpid/trunk/qpid/java/broker:742626,743015,743028-743029,743304,743306,743311,743357,744113,747363,747367,747369-747370,747376,747783,747868-747870,747875,748561,748591,748641,748680,748686,749149,749282,749285,749315,749340,749572,753219-753220,753253,754934,754958,755256,757258,757270,758730,759097,760919,761721,762365,762992,763959,764026,764109,764140,764790,805429-816233
+/qpid/trunk/qpid/java/broker:742626,743015,743028-743029,743304,743306,743311,743357,744113,747363,747367,747369-747370,747376,747783,747868-747870,747875,748561,748591,748641,748680,748686,749149,749282,749285,749315,749340,749572,753219-753220,753253,754934,754958,755256,757258,757270,758730,759097,760919,761721,762365,762992,763959,764026,764109,764140,764790,805429-824132

Propchange: qpid/branches/java-network-refactor/qpid/java/broker/bin/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Oct 11 23:22:08 2009
@@ -1,2 +1,2 @@
 /qpid/branches/0.5-release/qpid/java/broker/bin:757268
-/qpid/trunk/qpid/java/broker/bin:753219-753220,753253,758730,759097,760919,761721,762365,762992,763959,764026,764109,764140,764790,805429-816233
+/qpid/trunk/qpid/java/broker/bin:753219-753220,753253,758730,759097,760919,761721,762365,762992,763959,764026,764109,764140,764790,805429-824132

Modified: qpid/branches/java-network-refactor/qpid/java/broker/etc/log4j.xml
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/java/broker/etc/log4j.xml?rev=824198&r1=824197&r2=824198&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/java/broker/etc/log4j.xml (original)
+++ qpid/branches/java-network-refactor/qpid/java/broker/etc/log4j.xml Sun Oct 11 23:22:08 2009
@@ -87,6 +87,10 @@
         <priority value="debug"/>
     </category-->
 
+    <!-- Set the commons logging that the XML parser uses to WARN, it is very chatty at debug -->
+        <logger name="org.apache.commons">
+          <level value="WARN"/>
+        </logger>
 
     <!-- Log all info events to file -->
     <root>

Modified: qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQChannel.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQChannel.java?rev=824198&r1=824197&r2=824198&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQChannel.java (original)
+++ qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQChannel.java Sun Oct 11 23:22:08 2009
@@ -27,13 +27,12 @@
 import java.util.List;
 import java.util.Map;
 import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.ConcurrentMap;
+import java.util.concurrent.ConcurrentHashMap;
 
 import org.apache.log4j.Logger;
 import org.apache.qpid.AMQException;
-import org.apache.qpid.framing.AMQShortString;
-import org.apache.qpid.framing.ContentBody;
-import org.apache.qpid.framing.ContentHeaderBody;
-import org.apache.qpid.framing.FieldTable;
+import org.apache.qpid.framing.*;
 import org.apache.qpid.framing.abstraction.MessagePublishInfo;
 import org.apache.qpid.server.ack.UnacknowledgedMessageMap;
 import org.apache.qpid.server.ack.UnacknowledgedMessageMapImpl;
@@ -42,12 +41,7 @@
 import org.apache.qpid.server.flow.FlowCreditManager;
 import org.apache.qpid.server.flow.Pre0_10CreditManager;
 import org.apache.qpid.server.protocol.AMQProtocolSession;
-import org.apache.qpid.server.queue.AMQMessage;
-import org.apache.qpid.server.queue.AMQQueue;
-import org.apache.qpid.server.queue.IncomingMessage;
-import org.apache.qpid.server.queue.MessageHandleFactory;
-import org.apache.qpid.server.queue.QueueEntry;
-import org.apache.qpid.server.queue.UnauthorizedAccessException;
+import org.apache.qpid.server.queue.*;
 import org.apache.qpid.server.subscription.Subscription;
 import org.apache.qpid.server.subscription.SubscriptionFactoryImpl;
 import org.apache.qpid.server.subscription.ClientDeliveryMethod;
@@ -59,6 +53,7 @@
 import org.apache.qpid.server.txn.TransactionalContext;
 import org.apache.qpid.server.logging.LogActor;
 import org.apache.qpid.server.logging.LogSubject;
+import org.apache.qpid.server.logging.LogMessage;
 import org.apache.qpid.server.logging.messages.ChannelMessages;
 import org.apache.qpid.server.logging.subjects.ChannelLogSubject;
 import org.apache.qpid.server.logging.actors.AMQPChannelActor;
@@ -119,6 +114,11 @@
     private final AMQProtocolSession _session;
     private boolean _closing;
 
+    private final ConcurrentMap<AMQQueue, Boolean> _blockingQueues = new ConcurrentHashMap<AMQQueue, Boolean>();
+
+    private final AtomicBoolean _blocking = new AtomicBoolean(false);
+
+
     private LogActor _actor;
     private LogSubject _logSubject;
 
@@ -783,16 +783,32 @@
         return _unacknowledgedMessageMap;
     }
 
-
+    /**
+     * Called from the ChannelFlowHandler to suspend this Channel
+     * @param suspended boolean, should this Channel be suspended
+     */
     public void setSuspended(boolean suspended)
     {
-
-
         boolean wasSuspended = _suspended.getAndSet(suspended);
         if (wasSuspended != suspended)
         {
-            _actor.message(_logSubject, ChannelMessages.CHN_1002(suspended ? "Stopped" : "Started"));
+            // Log Flow Started before we start the subscriptions
+            if (!suspended)
+            {
+                _actor.message(_logSubject, ChannelMessages.CHN_1002("Started"));
+            }
+
+
+            // This section takes two different approaches to perform to perform
+            // the same function. Ensuring that the Subscription has taken note
+            // of the change in Channel State
 
+            // Here we have become unsuspended and so we ask each the queue to
+            // perform an Async delivery for each of the subscriptions in this
+            // Channel. The alternative would be to ensure that the subscription
+            // had received the change in suspension state. That way the logic
+            // behind decieding to start an async delivery was located with the
+            // Subscription.
             if (wasSuspended)
             {
                 // may need to deliver queued messages
@@ -801,6 +817,38 @@
                     s.getQueue().deliverAsync(s);
                 }
             }
+
+
+            // Here we have become suspended so we need to ensure that each of
+            // the Subscriptions has noticed this change so that we can be sure
+            // they are not still sending messages. Again the code here is a
+            // very simplistic approach to ensure that the change of suspension
+            // has been noticed by each of the Subscriptions. Unlike the above
+            // case we don't actually need to do anything else.
+            if (!wasSuspended)
+            {
+                // may need to deliver queued messages
+                for (Subscription s : _tag2SubscriptionMap.values())
+                {
+                    try
+                    {
+                        s.getSendLock();
+                    }
+                    finally
+                    {
+                        s.releaseSendLock();
+                    }
+                }
+            }
+
+
+            // Log Suspension only after we have confirmed all suspensions are
+            // stopped.
+            if (suspended)
+            {
+                _actor.message(_logSubject, ChannelMessages.CHN_1002("Stopped"));
+            }
+
         }
     }
 
@@ -931,4 +979,37 @@
     {
         return _actor;
     }
+
+    public void block(AMQQueue queue)
+    {
+        if(_blockingQueues.putIfAbsent(queue, Boolean.TRUE) == null)
+        {
+
+            if(_blocking.compareAndSet(false,true))
+            {
+                _actor.message(_logSubject, ChannelMessages.CHN_1005(queue.getName().toString()));
+                flow(false);
+            }
+        }
+    }
+
+    public void unblock(AMQQueue queue) 
+    {
+        if(_blockingQueues.remove(queue))
+        {
+            if(_blocking.compareAndSet(true,false))
+            {
+                _actor.message(_logSubject, ChannelMessages.CHN_1006());
+
+                flow(true);
+            }
+        }
+    }
+
+    private void flow(boolean flow)
+    {
+        MethodRegistry methodRegistry = _session.getMethodRegistry();
+        AMQMethodBody responseBody = methodRegistry.createChannelFlowBody(flow);
+        _session.writeFrame(responseBody.generateFrame(_channelId));
+    }
 }

Modified: qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/QueueConfiguration.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/QueueConfiguration.java?rev=824198&r1=824197&r2=824198&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/QueueConfiguration.java (original)
+++ qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/QueueConfiguration.java Sun Oct 11 23:22:08 2009
@@ -108,4 +108,14 @@
         return _config.getLong("minimumAlertRepeatGap", _vHostConfig.getMinimumAlertRepeatGap());
     }
 
+    public long getCapacity()
+    {
+        return _config.getLong("capacity", _vHostConfig.getCapacity());
+    }
+
+    public long getFlowResumeCapacity()
+    {
+        return _config.getLong("flowResumeCapacity", _vHostConfig.getFlowResumeCapacity());
+    }
+
 }

Modified: qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java?rev=824198&r1=824197&r2=824198&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java (original)
+++ qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java Sun Oct 11 23:22:08 2009
@@ -104,6 +104,8 @@
         envVarMap.put("QPID_MAXIMUMQUEUEDEPTH", "maximumQueueDepth");
         envVarMap.put("QPID_MAXIMUMMESSAGESIZE", "maximumMessageSize");
         envVarMap.put("QPID_MINIMUMALERTREPEATGAP", "minimumAlertRepeatGap");
+        envVarMap.put("QPID_QUEUECAPACITY", "capacity");
+        envVarMap.put("QPID_FLOWRESUMECAPACITY", "flowResumeCapacity");
         envVarMap.put("QPID_SOCKETRECEIVEBUFFER", "connector.socketReceiveBuffer");
         envVarMap.put("QPID_SOCKETWRITEBUFFER", "connector.socketWriteBuffer");
         envVarMap.put("QPID_TCPNODELAY", "connector.tcpNoDelay");
@@ -290,7 +292,6 @@
         return conf;
     }
 
-    @Override
     public void handle(Signal arg0)
     {
         try
@@ -508,6 +509,16 @@
         return getConfig().getLong("minimumAlertRepeatGap", 0);
     }
 
+    public long getCapacity()
+    {
+        return getConfig().getLong("capacity", 0L);
+    }
+
+    public long getFlowResumeCapacity()
+    {
+        return getConfig().getLong("flowResumeCapacity", getCapacity());
+    }
+
     public int getProcessors()
     {
         return getConfig().getInt("connector.processors", 4);

Modified: qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/VirtualHostConfiguration.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/VirtualHostConfiguration.java?rev=824198&r1=824197&r2=824198&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/VirtualHostConfiguration.java (original)
+++ qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/VirtualHostConfiguration.java Sun Oct 11 23:22:08 2009
@@ -166,4 +166,15 @@
         return _config.getLong("queues.minimumAlertRepeatGap", 0);
     }
 
+
+    public long getCapacity()
+    {
+        return _config.getLong("queues.capacity", 0l);
+    }
+
+    public long getFlowResumeCapacity()
+    {
+        return _config.getLong("queues.flowResumeCapacity", getCapacity());
+    }
+
 }

Modified: qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/management/ConfigurationManagementMBean.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/management/ConfigurationManagementMBean.java?rev=824198&r1=824197&r2=824198&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/management/ConfigurationManagementMBean.java (original)
+++ qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/management/ConfigurationManagementMBean.java Sun Oct 11 23:22:08 2009
@@ -35,13 +35,11 @@
         super(ConfigurationManagement.class, ConfigurationManagement.TYPE, ConfigurationManagement.VERSION);
     }
 
-    @Override
     public String getObjectInstanceName()
     {
         return ConfigurationManagement.TYPE;
     }
 
-    @Override
     public void reloadSecurityConfiguration() throws Exception
     {
         ApplicationRegistry.getInstance().getConfiguration().reparseConfigFile();

Modified: qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/DefaultExchangeFactory.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/DefaultExchangeFactory.java?rev=824198&r1=824197&r2=824198&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/DefaultExchangeFactory.java (original)
+++ qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/DefaultExchangeFactory.java Sun Oct 11 23:22:08 2009
@@ -73,7 +73,6 @@
         return e;
     }
 
-    @Override
     public void initialise(VirtualHostConfiguration hostConfig)
     {
 

Modified: qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/BasicRejectMethodHandler.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/BasicRejectMethodHandler.java?rev=824198&r1=824197&r2=824198&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/BasicRejectMethodHandler.java (original)
+++ qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/BasicRejectMethodHandler.java Sun Oct 11 23:22:08 2009
@@ -71,7 +71,7 @@
         {
             _logger.warn("Dropping reject request as message is null for tag:" + deliveryTag);
 //            throw evt.getMethod().getChannelException(AMQConstant.NOT_FOUND, "Delivery Tag(" + deliveryTag + ")not known");
-        }
+        }                 
         else
         {
             if (message.isQueueDeleted())

Modified: qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/ChannelOpenHandler.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/ChannelOpenHandler.java?rev=824198&r1=824197&r2=824198&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/ChannelOpenHandler.java (original)
+++ qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/ChannelOpenHandler.java Sun Oct 11 23:22:08 2009
@@ -54,6 +54,13 @@
         AMQProtocolSession session = stateManager.getProtocolSession();
         VirtualHost virtualHost = session.getVirtualHost();
 
+        
+        // Protect the broker against out of order frame request.
+        if (virtualHost == null)
+        {
+            throw new AMQException(AMQConstant.COMMAND_INVALID, "Virtualhost has not yet been set. ConnectionOpen has not been called.", null);
+        }
+
         final AMQChannel channel = new AMQChannel(session,channelId,
                                                   virtualHost.getMessageStore());
 

Modified: qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/actors/AbstractActor.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/actors/AbstractActor.java?rev=824198&r1=824197&r2=824198&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/actors/AbstractActor.java (original)
+++ qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/actors/AbstractActor.java Sun Oct 11 23:22:08 2009
@@ -60,4 +60,9 @@
         return _rootLogger;
     }
 
+    public String toString()
+    {
+        return _logString;
+    }
+
 }

Modified: qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/actors/BrokerActor.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/actors/BrokerActor.java?rev=824198&r1=824197&r2=824198&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/actors/BrokerActor.java (original)
+++ qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/actors/BrokerActor.java Sun Oct 11 23:22:08 2009
@@ -36,4 +36,12 @@
 
         _logString = "[Broker] ";
     }
+
+    public BrokerActor(String name, RootMessageLogger logger)
+    {
+        super(logger);
+
+        _logString = "[Broker(" + name + ")] ";
+    }
+
 }

Modified: qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/messages/LogMessages_en_US.properties
URL: http://svn.apache.org/viewvc/qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/messages/LogMessages_en_US.properties?rev=824198&r1=824197&r2=824198&view=diff
==============================================================================
--- qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/messages/LogMessages_en_US.properties (original)
+++ qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/messages/LogMessages_en_US.properties Sun Oct 11 23:22:08 2009
@@ -249,12 +249,16 @@
 # 0 - bytes allowed in prefetch
 # 1 - number of messagse. 
 CHN-1004 = Prefetch Size (bytes) {0,number} : Count {1,number}
+CHN-1005 = Flow Control Enforced (Queue {0})
+CHN-1006 = Flow Control Removed
 
 #Queue
 # 0 - owner
 # 1 - priority
 QUE-1001 = Create :[ Owner: {0}][ AutoDelete][ Durable][ Transient][ Priority: {1,number,#}]
 QUE-1002 = Deleted
+QUE-1003 = Overfull : Size : {0,number} bytes, Capacity : {1,number}
+QUE-1004 = Underfull : Size : {0,number} bytes, Resume Capacity : {1,number}
 
 #Exchange
 # 0 - type
@@ -269,4 +273,4 @@
 #Subscription
 SUB-1001 = Create[ : Durable][ : Arguments : {0}]
 SUB-1002 = Close
-SUB-1003 = State : {0}
\ No newline at end of file
+SUB-1003 = State : {0}

Propchange: qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/management/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Oct 11 23:22:08 2009
@@ -1,3 +1,3 @@
 /qpid/branches/0.5-release/qpid/java/broker/src/main/java/org/apache/qpid/server/management:757268
 /qpid/branches/jmx_mc_gsoc09/qpid/java/broker/src/main/java/org/apache/qpid/server/management:787599
-/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/management:753219-753220,753253,758730,759097,760919,761721,762365,762992,763959,764026,764109,764140,764790,805429-816233
+/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/management:753219-753220,753253,758730,759097,760919,761721,762365,762992,763959,764026,764109,764140,764790,805429-824132



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


Mime
View raw message