summaryrefslogtreecommitdiff
path: root/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
commit8ad76093e682ee735314a6768709b77a09d152ec (patch)
tree820c8d0055018b1b675fb018d8516da3363e716a /cpp/src/tests/cluster_test.cpp
parent7f272c99e485eaa8eb38ac9b28d82637aeb4dbbc (diff)
downloadqpid-python-8ad76093e682ee735314a6768709b77a09d152ec.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/qpid@711623 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/cluster_test.cpp')
-rw-r--r--cpp/src/tests/cluster_test.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/cpp/src/tests/cluster_test.cpp b/cpp/src/tests/cluster_test.cpp
index cf6c2e73de..5fc513bb28 100644
--- a/cpp/src/tests/cluster_test.cpp
+++ b/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)));