summaryrefslogtreecommitdiff
path: root/cpp/src/tests/MessagingSessionTests.cpp
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2010-01-28 08:37:37 +0000
committerGordon Sim <gsim@apache.org>2010-01-28 08:37:37 +0000
commit507ee7269a2f379e51cd6667db0d0892c159568f (patch)
treef55ff48efa8e2b43c3bf3e0f1d4003b4d7fbe88f /cpp/src/tests/MessagingSessionTests.cpp
parent3a0f29176a97d2091234f5067ac83640be019e1c (diff)
downloadqpid-python-507ee7269a2f379e51cd6667db0d0892c159568f.tar.gz
QPID-664: change format of connection options string to match address options; make open() a non-static method.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@904000 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/MessagingSessionTests.cpp')
-rw-r--r--cpp/src/tests/MessagingSessionTests.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/cpp/src/tests/MessagingSessionTests.cpp b/cpp/src/tests/MessagingSessionTests.cpp
index 91dad8f3f2..9c6f066d64 100644
--- a/cpp/src/tests/MessagingSessionTests.cpp
+++ b/cpp/src/tests/MessagingSessionTests.cpp
@@ -110,9 +110,18 @@ struct MessagingFixture : public BrokerFixture
MessagingFixture(Broker::Options opts = Broker::Options()) :
BrokerFixture(opts),
- connection(Connection::open((boost::format("amqp:tcp:localhost:%1%") % (broker->getPort(Broker::TCP_TRANSPORT))).str())),
+ connection(open(broker->getPort(Broker::TCP_TRANSPORT))),
session(connection.newSession()),
- admin(broker->getPort(Broker::TCP_TRANSPORT)) {}
+ admin(broker->getPort(Broker::TCP_TRANSPORT))
+ {
+ }
+
+ static Connection open(uint16_t port)
+ {
+ Connection connection;
+ connection.open((boost::format("amqp:tcp:localhost:%1%") % (port)).str());
+ return connection;
+ }
void ping(const qpid::messaging::Address& address)
{