summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/tests/TestOptions.h
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2007-08-15 14:56:51 +0000
committerAlan Conway <aconway@apache.org>2007-08-15 14:56:51 +0000
commitd460316332913e2a0aa3c39e715b45e850879933 (patch)
treeddfb2cf981607f32ff0cfb85645a1efa8a126f8b /qpid/cpp/src/tests/TestOptions.h
parent2bab7f6c71bcd11ebe03213e74da7505e90d9d3d (diff)
downloadqpid-python-d460316332913e2a0aa3c39e715b45e850879933.tar.gz
* perftest/topic_publisher.cpp, topic_listener.cpp:
Combined into a single preftest.cpp executable and moved to src/tests. New perftest: - Supports all client-side options (--host, --port etc.) - Can be run as producer (--listen), consumer (--publish) or both. - --count specifies number of messages (default 500000 as before) git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@566211 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/TestOptions.h')
-rw-r--r--qpid/cpp/src/tests/TestOptions.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/qpid/cpp/src/tests/TestOptions.h b/qpid/cpp/src/tests/TestOptions.h
index 5b3c0958f5..95ebb1e219 100644
--- a/qpid/cpp/src/tests/TestOptions.h
+++ b/qpid/cpp/src/tests/TestOptions.h
@@ -25,6 +25,7 @@
#include "qpid/log/Options.h"
#include "qpid/Url.h"
#include "qpid/log/Logger.h"
+#include "qpid/client/Connection.h"
#include <iostream>
#include <exception>
@@ -63,6 +64,12 @@ struct TestOptions : public qpid::Options
trace = log.trace;
qpid::log::Logger::instance().configure(log, argv[0]);
}
+
+ /** Open a connection usin option values */
+ void open(qpid::client::Connection& connection) {
+ connection.open(host, port, username, password, virtualhost);
+ }
+
std::string host;
uint16_t port;