You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by gs...@apache.org on 2007/12/20 12:19:34 UTC
svn commit: r605888 - /incubator/qpid/trunk/qpid/cpp/src/tests/perftest.cpp
Author: gsim
Date: Thu Dec 20 03:19:30 2007
New Revision: 605888
URL: http://svn.apache.org/viewvc?rev=605888&view=rev
Log:
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).
Modified:
incubator/qpid/trunk/qpid/cpp/src/tests/perftest.cpp
Modified: incubator/qpid/trunk/qpid/cpp/src/tests/perftest.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/perftest.cpp?rev=605888&r1=605887&r2=605888&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/perftest.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/perftest.cpp Thu Dec 20 03:19:30 2007
@@ -484,15 +484,16 @@
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)