From 9aaff1927138abfe1b9030c1065a1e26b423c332 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Tue, 24 Feb 2009 19:27:57 +0000 Subject: 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 --- qpid/cpp/src/tests/failover_soak.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'qpid/cpp/src/tests/failover_soak.cpp') 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 +#include "qpid/framing/Uuid.h" + #include @@ -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; -- cgit v1.2.1