summaryrefslogtreecommitdiff
path: root/cpp/src/tests
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/tests')
-rw-r--r--cpp/src/tests/MessagingSessionTests.cpp14
-rw-r--r--cpp/src/tests/qpid_receive.cpp2
-rw-r--r--cpp/src/tests/qpid_send.cpp2
-rw-r--r--cpp/src/tests/qpid_stream.cpp2
4 files changed, 10 insertions, 10 deletions
diff --git a/cpp/src/tests/MessagingSessionTests.cpp b/cpp/src/tests/MessagingSessionTests.cpp
index bdd5422690..aa0c65d319 100644
--- a/cpp/src/tests/MessagingSessionTests.cpp
+++ b/cpp/src/tests/MessagingSessionTests.cpp
@@ -116,7 +116,7 @@ struct MessagingFixture : public BrokerFixture
static Connection open(uint16_t port)
{
Connection connection((boost::format("amqp:tcp:localhost:%1%") % (port)).str());
- connection.connect();
+ connection.open();
return connection;
}
@@ -266,20 +266,20 @@ QPID_AUTO_TEST_CASE(testSenderError)
{
MessagingFixture fix;
ScopedSuppressLogging sl;
- BOOST_CHECK_THROW(fix.session.createSender("NonExistentAddress"), qpid::messaging::InvalidAddress);
+ BOOST_CHECK_THROW(fix.session.createSender("NonExistentAddress"), qpid::messaging::NotFound);
fix.session = fix.connection.createSession();
BOOST_CHECK_THROW(fix.session.createSender("NonExistentAddress; {create:receiver}"),
- qpid::messaging::InvalidAddress);
+ qpid::messaging::NotFound);
}
QPID_AUTO_TEST_CASE(testReceiverError)
{
MessagingFixture fix;
ScopedSuppressLogging sl;
- BOOST_CHECK_THROW(fix.session.createReceiver("NonExistentAddress"), qpid::messaging::InvalidAddress);
+ BOOST_CHECK_THROW(fix.session.createReceiver("NonExistentAddress"), qpid::messaging::NotFound);
fix.session = fix.connection.createSession();
BOOST_CHECK_THROW(fix.session.createReceiver("NonExistentAddress; {create:sender}"),
- qpid::messaging::InvalidAddress);
+ qpid::messaging::NotFound);
}
QPID_AUTO_TEST_CASE(testSimpleTopic)
@@ -766,10 +766,10 @@ QPID_AUTO_TEST_CASE(testAssertPolicyQueue)
std::string a2 = "q; {assert:receiver, node:{durable:true, x-declare:{arguments:{qpid.max-count:100}}}}";
Sender s2 = fix.session.createSender(a2);
s2.close();
- BOOST_CHECK_THROW(fix.session.createReceiver(a2), qpid::messaging::InvalidAddress);
+ BOOST_CHECK_THROW(fix.session.createReceiver(a2), qpid::messaging::AssertionFailed);
std::string a3 = "q; {assert:sender, node:{x-declare:{arguments:{qpid.max-count:99}}}}";
- BOOST_CHECK_THROW(fix.session.createSender(a3), qpid::messaging::InvalidAddress);
+ BOOST_CHECK_THROW(fix.session.createSender(a3), qpid::messaging::AssertionFailed);
Receiver r3 = fix.session.createReceiver(a3);
r3.close();
diff --git a/cpp/src/tests/qpid_receive.cpp b/cpp/src/tests/qpid_receive.cpp
index 77e9cd180a..46f3db6718 100644
--- a/cpp/src/tests/qpid_receive.cpp
+++ b/cpp/src/tests/qpid_receive.cpp
@@ -161,7 +161,7 @@ int main(int argc, char ** argv)
if (opts.parse(argc, argv)) {
Connection connection(opts.url, opts.connectionOptions);
try {
- connection.connect();
+ connection.open();
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 e51c5a93d2..914f910224 100644
--- a/cpp/src/tests/qpid_send.cpp
+++ b/cpp/src/tests/qpid_send.cpp
@@ -218,7 +218,7 @@ int main(int argc, char ** argv)
if (opts.parse(argc, argv)) {
Connection connection(opts.url, opts.connectionOptions);
try {
- connection.connect();
+ connection.open();
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 b3fe493922..4305ee8c49 100644
--- a/cpp/src/tests/qpid_stream.cpp
+++ b/cpp/src/tests/qpid_stream.cpp
@@ -90,7 +90,7 @@ struct Client : qpid::sys::Runnable
{
Connection connection(opts.url);
try {
- connection.connect();
+ connection.open();
Session session = connection.createSession();
doWork(session);
session.close();