diff options
| author | Alan Conway <aconway@apache.org> | 2011-08-18 14:58:53 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2011-08-18 14:58:53 +0000 |
| commit | 3dbb71f39734ae769d258bb1548ba946e859a13a (patch) | |
| tree | 1e0b479ab1dc37e4aef389d980d0b81e1252681d /qpid/cpp/src/tests/exception_test.cpp | |
| parent | acef88b76696a58cc53e82c3000f91d489f0a382 (diff) | |
| download | qpid-python-3dbb71f39734ae769d258bb1548ba946e859a13a.tar.gz | |
NO-JIRA: eliminate SocketProxy from tests.
Was causing problems with changes to introduce IPv6.
In most cases this was being used unnecessarilly due to cut-and-paste of tests.
In the 2 cases it was useful, replaced by simply shutting down the broker
to simulate network failure.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1159268 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/exception_test.cpp')
| -rw-r--r-- | qpid/cpp/src/tests/exception_test.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/qpid/cpp/src/tests/exception_test.cpp b/qpid/cpp/src/tests/exception_test.cpp index 3536ffddbe..3e844b4e58 100644 --- a/qpid/cpp/src/tests/exception_test.cpp +++ b/qpid/cpp/src/tests/exception_test.cpp @@ -92,32 +92,30 @@ QPID_AUTO_TEST_CASE(TestSessionBusy) { } QPID_AUTO_TEST_CASE(DisconnectedPop) { - ProxySessionFixture fix; - ProxyConnection c(fix.broker->getPort(Broker::TCP_TRANSPORT)); + SessionFixture fix; fix.session.queueDeclare(arg::queue="q"); fix.subs.subscribe(fix.lq, "q"); Catcher<TransportFailure> pop(bind(&LocalQueue::pop, &fix.lq, sys::TIME_SEC)); - fix.connection.proxy.close(); + fix.shutdownBroker(); BOOST_CHECK(pop.join()); } QPID_AUTO_TEST_CASE(DisconnectedListen) { - ProxySessionFixture fix; + SessionFixture fix; struct NullListener : public MessageListener { void received(Message&) { BOOST_FAIL("Unexpected message"); } } l; - ProxyConnection c(fix.broker->getPort(Broker::TCP_TRANSPORT)); fix.session.queueDeclare(arg::queue="q"); fix.subs.subscribe(l, "q"); Catcher<TransportFailure> runner(bind(&SubscriptionManager::run, boost::ref(fix.subs))); - fix.connection.proxy.close(); - runner.join(); + fix.shutdownBroker(); + runner.join(); BOOST_CHECK_THROW(fix.session.queueDeclare(arg::queue="x"), TransportFailure); } QPID_AUTO_TEST_CASE(NoSuchQueueTest) { - ProxySessionFixture fix; + SessionFixture fix; ScopedSuppressLogging sl; // Suppress messages for expected errors. BOOST_CHECK_THROW(fix.subs.subscribe(fix.lq, "no such queue"), NotFoundException); } |
