summaryrefslogtreecommitdiff
path: root/cpp/src/tests/cluster_test.cpp
diff options
context:
space:
mode:
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)));