summaryrefslogtreecommitdiff
path: root/qpid/cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2009-02-24 19:27:57 +0000
committerAlan Conway <aconway@apache.org>2009-02-24 19:27:57 +0000
commit9aaff1927138abfe1b9030c1065a1e26b423c332 (patch)
tree958e0887f65eca8aded64b97a8807c29f06b2636 /qpid/cpp
parent53ac2c08378256c7723b5266e56e6d060e8718e5 (diff)
downloadqpid-python-9aaff1927138abfe1b9030c1065a1e26b423c332.tar.gz
QPID-1678 Mick Goulish: failover_soak using UUIDs for cluster name to avoid clashes.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@747521 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp')
-rw-r--r--qpid/cpp/src/tests/failover_soak.cpp11
-rwxr-xr-xqpid/cpp/src/tests/run_failover_soak6
2 files changed, 9 insertions, 8 deletions
diff --git a/qpid/cpp/src/tests/failover_soak.cpp b/qpid/cpp/src/tests/failover_soak.cpp
index 129c6b9745..5aad2b84e9 100644
--- a/qpid/cpp/src/tests/failover_soak.cpp
+++ b/qpid/cpp/src/tests/failover_soak.cpp
@@ -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 @@ mrand ( int minDesiredVal, int maxDesiredVal ) {
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 @@ main ( int argc, char const ** argv )
allMyChildren.verbosity = verbosity;
- int clusterNum;
string clusterName;
srand ( getpid() );
- makeClusterName ( clusterName, clusterNum );
+ makeClusterName ( clusterName );
brokerVector brokers;
diff --git a/qpid/cpp/src/tests/run_failover_soak b/qpid/cpp/src/tests/run_failover_soak
index 9dddf59cf1..f485f7434d 100755
--- a/qpid/cpp/src/tests/run_failover_soak
+++ b/qpid/cpp/src/tests/run_failover_soak
@@ -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 @@ report_frequency=10000
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