diff options
author | Alan Conway <aconway@apache.org> | 2008-07-01 18:01:11 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2008-07-01 18:01:11 +0000 |
commit | b010894ebe6c468fef0c14ad869b80ef336ab11f (patch) | |
tree | 87fd021e862ad21abffc9457711f066651e67418 /cpp/src/tests/ClientSessionTest.cpp | |
parent | 4db79de7e806ceba3a243abef9847f15fc41cc40 (diff) | |
download | qpid-python-b010894ebe6c468fef0c14ad869b80ef336ab11f.tar.gz |
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
Diffstat (limited to 'cpp/src/tests/ClientSessionTest.cpp')
-rw-r--r-- | cpp/src/tests/ClientSessionTest.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
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) { |