From d930f07d077945ebc1db161e6b6691b987938484 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Thu, 18 Aug 2011 14:58:53 +0000 Subject: 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 --- cpp/src/tests/ClientSessionTest.cpp | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) (limited to 'cpp/src/tests/ClientSessionTest.cpp') diff --git a/cpp/src/tests/ClientSessionTest.cpp b/cpp/src/tests/ClientSessionTest.cpp index 3c0cff7350..30441cd03c 100644 --- a/cpp/src/tests/ClientSessionTest.cpp +++ b/cpp/src/tests/ClientSessionTest.cpp @@ -102,9 +102,9 @@ struct SimpleListener : public MessageListener } }; -struct ClientSessionFixture : public ProxySessionFixture +struct ClientSessionFixture : public SessionFixture { - ClientSessionFixture(Broker::Options opts = Broker::Options()) : ProxySessionFixture(opts) { + ClientSessionFixture(Broker::Options opts = Broker::Options()) : SessionFixture(opts) { session.queueDeclare(arg::queue="my-queue"); } }; @@ -150,16 +150,6 @@ QPID_AUTO_TEST_CASE(testDispatcherThread) BOOST_CHECK_EQUAL(boost::lexical_cast(i), listener.messages[i].getData()); } -// FIXME aconway 2009-06-17: test for unimplemented feature, enable when implemented. -void testSuspend0Timeout() { - ClientSessionFixture fix; - fix.session.suspend(); // session has 0 timeout. - try { - fix.connection.resume(fix.session); - BOOST_FAIL("Expected InvalidArgumentException."); - } catch(const InternalErrorException&) {} -} - QPID_AUTO_TEST_CASE(testUseSuspendedError) { ClientSessionFixture fix; @@ -171,18 +161,6 @@ QPID_AUTO_TEST_CASE(testUseSuspendedError) } catch(const NotAttachedException&) {} } -// FIXME aconway 2009-06-17: test for unimplemented feature, enable when implemented. -void testSuspendResume() { - ClientSessionFixture fix; - fix.session.timeout(60); - fix.session.suspend(); - // Make sure we are still subscribed after resume. - fix.connection.resume(fix.session); - fix.session.messageTransfer(arg::content=Message("my-message", "my-queue")); - BOOST_CHECK_EQUAL("my-message", fix.subs.get("my-queue", TIME_SEC).getData()); -} - - QPID_AUTO_TEST_CASE(testSendToSelf) { ClientSessionFixture fix; SimpleListener mylistener; -- cgit v1.2.1