qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject svn commit: r747162 - in /qpid/trunk/qpid/cpp/src: qpid/broker/SessionState.cpp tests/failover_soak.cpp tests/federated_cluster_test
Date Mon, 23 Feb 2009 22:12:24 GMT
Author: aconway
Date: Mon Feb 23 22:12:19 2009
New Revision: 747162

URL: http://svn.apache.org/viewvc?rev=747162&view=rev
Log:
QPID-1674 Mick Goulish: Fixes an error caused by a string going out of scope just before ForkedBroker
startup.

Modified:
    qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.cpp
    qpid/trunk/qpid/cpp/src/tests/failover_soak.cpp
    qpid/trunk/qpid/cpp/src/tests/federated_cluster_test

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.cpp?rev=747162&r1=747161&r2=747162&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/SessionState.cpp Mon Feb 23 22:12:19 2009
@@ -210,6 +210,7 @@
     {}
 
     void fire() {
+        QPID_LOG(critical, "ScheduledCreditTask fired"); // FIXME aconway 2009-02-23: REMOVE
         // This is the best we can currently do to avoid a destruction/fire race
         if (!isCancelled()) {
             if ( !sessionState.processSendCredit(0) ) {

Modified: qpid/trunk/qpid/cpp/src/tests/failover_soak.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/failover_soak.cpp?rev=747162&r1=747161&r2=747162&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/failover_soak.cpp (original)
+++ qpid/trunk/qpid/cpp/src/tests/failover_soak.cpp Mon Feb 23 22:12:19 2009
@@ -32,12 +32,17 @@
 #include <sstream>
 #include <vector>
 
+#include <boost/assign.hpp>
+
 #include <ForkedBroker.h>
 
 
 
 
+
 using namespace std;
+using boost::assign::list_of;
+
 
 
 typedef vector<ForkedBroker *> brokerVector;
@@ -275,24 +280,22 @@
     module << moduleDir << "/cluster.so";
     path << srcRoot << "/qpidd";
     prefix << "soak-" << brokerId++;
-  
-    const char * const argv[] = 
-    {
-        "qpidd",
-        "-p0",
-        "--load-module=cluster.so",
-        "--cluster-name",
-        clusterName.c_str(),
-        "--auth=no", 
-        "--no-data-dir",
-        "--no-module-dir",
-        "--mgmt-enable=no",
-        "--log-prefix", prefix.str().c_str(),
-        0
-    };
 
-    size_t argc = sizeof(argv)/sizeof(argv[0]);
-    brokers.push_back ( new ForkedBroker ( argc, argv ) );
+    std::vector<std::string> argv = 
+        list_of<string> ("qpidd")
+                        ("--no-module-dir")
+                        ("--load-module=cluster.so")
+                        ("--cluster-name")
+                        (clusterName)
+                        ("--auth=no")
+                        ("--no-data-dir")
+                        ("--mgmt-enable=no")
+                        ("--log-prefix")
+                        (prefix.str())
+                        ("--log-to-file")
+                        ("/tmp/qpidd.log");
+
+    brokers.push_back ( new ForkedBroker ( argv ) );
 }
 
 

Modified: qpid/trunk/qpid/cpp/src/tests/federated_cluster_test
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/federated_cluster_test?rev=747162&r1=747161&r2=747162&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/federated_cluster_test (original)
+++ qpid/trunk/qpid/cpp/src/tests/federated_cluster_test Mon Feb 23 22:12:19 2009
@@ -21,8 +21,8 @@
 
 # Test reliability of the replication feature in the face of link
 # failures:
-MY_DIR=`dirname \`which $0\``
-PYTHON_DIR=${MY_DIR}/../../../python
+srcdir=`dirname $0`
+PYTHON_DIR=${srcdir}/../../../python
 
 trap stop_brokers EXIT
 
@@ -48,7 +48,7 @@
     BROKER_A=`cat fed.port.tmp`
 
     #...and start cluster
-    ./start_cluster 2 || fail "Could not start cluster"
+    $srcdir/start_cluster 2 || fail "Could not start cluster"
     NODE_1=$(head -1 cluster.ports)
     NODE_2=$(tail -1 cluster.ports)
 }



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


Mime
View raw message