summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/tests/perftest.cpp
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2007-12-20 11:19:30 +0000
committerGordon Sim <gsim@apache.org>2007-12-20 11:19:30 +0000
commit708aa0765e1135b72571a796370988efe893e7b0 (patch)
tree895feb657eb3f7ca4a60b7b299c15134236160be /qpid/cpp/src/tests/perftest.cpp
parent66bf455a9ce9595c8139e2690799f397f0113178 (diff)
downloadqpid-python-708aa0765e1135b72571a796370988efe893e7b0.tar.gz
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
Diffstat (limited to 'qpid/cpp/src/tests/perftest.cpp')
-rw-r--r--qpid/cpp/src/tests/perftest.cpp15
1 files changed, 8 insertions, 7 deletions
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)