From 7e7e59308b8a2d19770283d197580b37328aa711 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/qpid@605888 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/tests/perftest.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'cpp') diff --git a/cpp/src/tests/perftest.cpp b/cpp/src/tests/perftest.cpp index e15cb33164..ee210891fe 100644 --- a/cpp/src/tests/perftest.cpp +++ b/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