diff options
author | Gordon Sim <gsim@apache.org> | 2007-12-20 11:19:30 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2007-12-20 11:19:30 +0000 |
commit | 7e7e59308b8a2d19770283d197580b37328aa711 (patch) | |
tree | 27b000f83afdbefbf03b35b786ed3d257ebe656b /cpp/src/tests/perftest.cpp | |
parent | 5298c120af8b6ba20c7d9eb2956bcd9ac0b42027 (diff) | |
download | qpid-python-7e7e59308b8a2d19770283d197580b37328aa711.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/qpid@605888 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/perftest.cpp')
-rw-r--r-- | cpp/src/tests/perftest.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
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) |