From b010894ebe6c468fef0c14ad869b80ef336ab11f Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Tue, 1 Jul 2008 18:01:11 +0000 Subject: Added timeout to SubscriptionManager::get(), LocalQueue::get() and BlockingQueue::get() git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@673158 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/tests/ClientSessionTest.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'cpp/src/tests/ClientSessionTest.cpp') diff --git a/cpp/src/tests/ClientSessionTest.cpp b/cpp/src/tests/ClientSessionTest.cpp index 505f3248a4..b55e4c231e 100644 --- a/cpp/src/tests/ClientSessionTest.cpp +++ b/cpp/src/tests/ClientSessionTest.cpp @@ -41,6 +41,7 @@ using namespace qpid::client::arg; using namespace qpid::framing; using namespace qpid; using qpid::sys::Monitor; +using qpid::sys::TIME_SEC; using std::string; using std::cout; using std::endl; @@ -242,8 +243,11 @@ QPID_AUTO_TEST_CASE(testGet) { fix.session.queueDeclare(queue="getq", exclusive=true, autoDelete=true); fix.session.messageTransfer(content=Message("foo0", "getq")); fix.session.messageTransfer(content=Message("foo1", "getq")); - BOOST_CHECK_EQUAL("foo0", fix.subs.get("getq").getData()); - BOOST_CHECK_EQUAL("foo1", fix.subs.get("getq").getData()); + Message got; + BOOST_CHECK(fix.subs.get(got, "getq", TIME_SEC)); + BOOST_CHECK_EQUAL("foo0", got.getData()); + BOOST_CHECK(fix.subs.get(got, "getq", TIME_SEC)); + BOOST_CHECK_EQUAL("foo1", got.getData()); } QPID_AUTO_TEST_CASE(testOpenFailure) { -- cgit v1.2.1