You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2009/02/24 20:27:58 UTC

svn commit: r747521 - in /qpid/trunk/qpid/cpp/src/tests: failover_soak.cpp run_failover_soak

Author: aconway
Date: Tue Feb 24 19:27:57 2009
New Revision: 747521

URL: http://svn.apache.org/viewvc?rev=747521&view=rev
Log:
QPID-1678 Mick Goulish: failover_soak using UUIDs for cluster name to avoid clashes.

Modified:
    qpid/trunk/qpid/cpp/src/tests/failover_soak.cpp
    qpid/trunk/qpid/cpp/src/tests/run_failover_soak

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=747521&r1=747520&r2=747521&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/failover_soak.cpp (original)
+++ qpid/trunk/qpid/cpp/src/tests/failover_soak.cpp Tue Feb 24 19:27:57 2009
@@ -34,6 +34,8 @@
 
 #include <boost/assign.hpp>
 
+#include "qpid/framing/Uuid.h"
+
 #include <ForkedBroker.h>
 
 
@@ -42,6 +44,7 @@
 
 using namespace std;
 using boost::assign::list_of;
+using namespace qpid::framing;
 
 
 
@@ -240,10 +243,9 @@
 
 
 void
-makeClusterName ( string & s, int & num ) {
-    num = mrand(1000);
+makeClusterName ( string & s ) {
     stringstream ss;
-    ss << "soakTestCluster_" << num;
+    ss << "soakTestCluster_" << Uuid(true).str();
     s = ss.str();
 }
 
@@ -492,12 +494,11 @@
 
     allMyChildren.verbosity = verbosity;
 
-    int clusterNum;
     string clusterName;
 
     srand ( getpid() );
 
-    makeClusterName ( clusterName, clusterNum );
+    makeClusterName ( clusterName );
 
     brokerVector brokers;
 

Modified: qpid/trunk/qpid/cpp/src/tests/run_failover_soak
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/run_failover_soak?rev=747521&r1=747520&r2=747521&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/run_failover_soak (original)
+++ qpid/trunk/qpid/cpp/src/tests/run_failover_soak Tue Feb 24 19:27:57 2009
@@ -22,8 +22,8 @@
 # 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 >/dev/null || \
-    NOAISEXEC="The aisexec daemon is not running as root"
+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
@@ -52,5 +52,5 @@
 verbosity=1
 
 
-exec `dirname $0`/failover_soak $src_root $module_dir $host ./declare_queues ./replaying_sender ./resuming_receiver $n_messages $report_frequency $verbosity
+exec ./failover_soak $src_root $module_dir $host ./declare_queues ./replaying_sender ./resuming_receiver $n_messages $report_frequency $verbosity
 



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