summaryrefslogtreecommitdiff
path: root/cpp/src/tests
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2010-04-08 09:49:04 +0000
committerGordon Sim <gsim@apache.org>2010-04-08 09:49:04 +0000
commita62b3c4f125306ceec23175b9c7aef2786ee786c (patch)
treef7aeeba9df178aabc896a118464fc2044e53aa6a /cpp/src/tests
parentbe01dfd2d74634abf3387e8eb363d2c90b31cf0d (diff)
downloadqpid-python-a62b3c4f125306ceec23175b9c7aef2786ee786c.tar.gz
QPID-664: changed open() to connect(), moved url parameter to constructor, added detach() and isConnected()
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@931852 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests')
-rw-r--r--cpp/src/tests/MessagingSessionTests.cpp4
-rw-r--r--cpp/src/tests/qpid_recv.cpp4
-rw-r--r--cpp/src/tests/qpid_send.cpp4
-rw-r--r--cpp/src/tests/qpid_stream.cpp4
4 files changed, 8 insertions, 8 deletions
diff --git a/cpp/src/tests/MessagingSessionTests.cpp b/cpp/src/tests/MessagingSessionTests.cpp
index 6341ef3f28..bdd5422690 100644
--- a/cpp/src/tests/MessagingSessionTests.cpp
+++ b/cpp/src/tests/MessagingSessionTests.cpp
@@ -115,8 +115,8 @@ struct MessagingFixture : public BrokerFixture
static Connection open(uint16_t port)
{
- Connection connection;
- connection.open((boost::format("amqp:tcp:localhost:%1%") % (port)).str());
+ Connection connection((boost::format("amqp:tcp:localhost:%1%") % (port)).str());
+ connection.connect();
return connection;
}
diff --git a/cpp/src/tests/qpid_recv.cpp b/cpp/src/tests/qpid_recv.cpp
index 602f91d74e..77e9cd180a 100644
--- a/cpp/src/tests/qpid_recv.cpp
+++ b/cpp/src/tests/qpid_recv.cpp
@@ -159,9 +159,9 @@ int main(int argc, char ** argv)
{
Options opts;
if (opts.parse(argc, argv)) {
- Connection connection(opts.connectionOptions);
+ Connection connection(opts.url, opts.connectionOptions);
try {
- connection.open(opts.url);
+ connection.connect();
std::auto_ptr<FailoverUpdates> updates(opts.failoverUpdates ? new FailoverUpdates(connection) : 0);
Session session = opts.tx ? connection.createTransactionalSession() : connection.createSession();
Receiver receiver = session.createReceiver(opts.address);
diff --git a/cpp/src/tests/qpid_send.cpp b/cpp/src/tests/qpid_send.cpp
index feeabefbdd..e51c5a93d2 100644
--- a/cpp/src/tests/qpid_send.cpp
+++ b/cpp/src/tests/qpid_send.cpp
@@ -216,9 +216,9 @@ int main(int argc, char ** argv)
{
Options opts;
if (opts.parse(argc, argv)) {
- Connection connection(opts.connectionOptions);
+ Connection connection(opts.url, opts.connectionOptions);
try {
- connection.open(opts.url);
+ connection.connect();
std::auto_ptr<FailoverUpdates> updates(opts.failoverUpdates ? new FailoverUpdates(connection) : 0);
Session session = opts.tx ? connection.createTransactionalSession() : connection.createSession();
Sender sender = session.createSender(opts.address);
diff --git a/cpp/src/tests/qpid_stream.cpp b/cpp/src/tests/qpid_stream.cpp
index eafa6e96fa..b3fe493922 100644
--- a/cpp/src/tests/qpid_stream.cpp
+++ b/cpp/src/tests/qpid_stream.cpp
@@ -88,9 +88,9 @@ struct Client : qpid::sys::Runnable
void run()
{
- Connection connection;
+ Connection connection(opts.url);
try {
- connection.open(opts.url);
+ connection.connect();
Session session = connection.createSession();
doWork(session);
session.close();