summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/tests/cluster_test.cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2008-11-05 17:09:33 +0000
committerAlan Conway <aconway@apache.org>2008-11-05 17:09:33 +0000
commit65ad0983bf7521a8a5255cfeac307609376bab9e (patch)
tree994bc6fed53b02408054100ef26a4512bf62a84b /qpid/cpp/src/tests/cluster_test.cpp
parenta688ff0bde040f8311ca6c179344f9288053cf25 (diff)
downloadqpid-python-65ad0983bf7521a8a5255cfeac307609376bab9e.tar.gz
Cluster: clean up connections when a member leaves the cluster.
Fixed a memory error in cluster_test and some reporting errors in test scripts. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@711623 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/cluster_test.cpp')
-rw-r--r--qpid/cpp/src/tests/cluster_test.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/qpid/cpp/src/tests/cluster_test.cpp b/qpid/cpp/src/tests/cluster_test.cpp
index cf6c2e73de..5fc513bb28 100644
--- a/qpid/cpp/src/tests/cluster_test.cpp
+++ b/qpid/cpp/src/tests/cluster_test.cpp
@@ -117,12 +117,13 @@ ClusterFixture::ClusterFixture(size_t n, int localIndex_) : name(Uuid(true).str(
void ClusterFixture::add() {
if (size() != size_t(localIndex)) { // fork a broker process.
std::ostringstream os; os << "fork" << size();
+ std::string prefix = os.str();
const char* argv[] = {
"qpidd " __FILE__ ,
"--load-module=../.libs/cluster.so",
"--cluster-name", name.c_str(),
"--auth=no", "--no-data-dir",
- "--log-prefix", os.str().c_str(),
+ "--log-prefix", prefix.c_str(),
};
size_t argc = sizeof(argv)/sizeof(argv[0]);
forkedBrokers.push_back(shared_ptr<ForkedBroker>(new ForkedBroker(argc, argv)));