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 | 37a197c8bb346922b608847898e5e2764f9f6b9d (patch) | |
tree | 22ccc0f46fc14353ef949d3c8907c39f107302dc /cpp/src/tests/exception_test.cpp | |
parent | 832ffd28c2815d358a72066c3659afd687c5e9b6 (diff) | |
download | qpid-python-37a197c8bb346922b608847898e5e2764f9f6b9d.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/qpid@1159268 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/exception_test.cpp')
-rw-r--r-- | cpp/src/tests/exception_test.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/cpp/src/tests/exception_test.cpp b/cpp/src/tests/exception_test.cpp index 3536ffddbe..3e844b4e58 100644 --- a/cpp/src/tests/exception_test.cpp +++ b/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); } |