From 708aa0765e1135b72571a796370988efe893e7b0 Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Thu, 20 Dec 2007 11:19:30 +0000 Subject: Fixed to ensure that the correct exchange is used for different modes. (Previously the default exchange was being used regardless of mode; if a shared test was run followed by e.g. a fanout test the messages would collect in the shared queue which had no listeners and the memroy buildup skewed test results). git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@605888 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/src/tests/perftest.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'qpid/cpp/src/tests') diff --git a/qpid/cpp/src/tests/perftest.cpp b/qpid/cpp/src/tests/perftest.cpp index e15cb33164..ee210891fe 100644 --- a/qpid/cpp/src/tests/perftest.cpp +++ b/qpid/cpp/src/tests/perftest.cpp @@ -484,15 +484,16 @@ struct SubscribeThread : public Client { int main(int argc, char** argv) { - string exchange; - switch (opts.mode) { - case FANOUT: exchange="amq.fanout"; break; - case TOPIC: exchange="amq.topic"; break; - case SHARED: break; - } - try { opts.parse(argc, argv); + + string exchange; + switch (opts.mode) { + case FANOUT: exchange="amq.fanout"; break; + case TOPIC: exchange="amq.topic"; break; + case SHARED: break; + } + bool singleProcess= (!opts.setup && !opts.control && !opts.publish && !opts.subscribe); if (singleProcess) -- cgit v1.2.1