diff options
author | Kim van der Riet <kpvdr@apache.org> | 2012-10-18 13:37:42 +0000 |
---|---|---|
committer | Kim van der Riet <kpvdr@apache.org> | 2012-10-18 13:37:42 +0000 |
commit | 172d9b2a16cfb817bbe632d050acba7e31401cd2 (patch) | |
tree | 7c5dd5ccba8734a455f20bccaae1cb80a5483b91 /cpp/src/tests | |
parent | c095a631dcb2c7be5e167ed50f658f7c24330a45 (diff) | |
download | qpid-python-172d9b2a16cfb817bbe632d050acba7e31401cd2.tar.gz |
WIP - async store interface working for configuration (adding and removing queues, links and exchanges) and for enqueues and dequeues of messages. Transactions are not yet included, and hence some tests will fail.
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/asyncstore@1399662 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests')
-rw-r--r-- | cpp/src/tests/ExchangeTest.cpp | 46 | ||||
-rw-r--r-- | cpp/src/tests/HeadersExchangeTest.cpp | 2 | ||||
-rw-r--r-- | cpp/src/tests/QueueTest.cpp | 6 |
3 files changed, 27 insertions, 27 deletions
diff --git a/cpp/src/tests/ExchangeTest.cpp b/cpp/src/tests/ExchangeTest.cpp index 4f18b91b5a..259860e6cd 100644 --- a/cpp/src/tests/ExchangeTest.cpp +++ b/cpp/src/tests/ExchangeTest.cpp @@ -51,12 +51,12 @@ QPID_AUTO_TEST_CASE(testMe) Queue::shared_ptr queue2(new Queue("queue2", true)); TopicExchange topic("topic"); - topic.bind(queue, "abc", 0); - topic.bind(queue2, "abc", 0); + topic.bind(queue, "abc", 0, 0); + topic.bind(queue2, "abc", 0, 0); DirectExchange direct("direct"); - direct.bind(queue, "abc", 0); - direct.bind(queue2, "abc", 0); + direct.bind(queue, "abc", 0, 0); + direct.bind(queue2, "abc", 0, 0); queue.reset(); queue2.reset(); @@ -78,9 +78,9 @@ QPID_AUTO_TEST_CASE(testIsBound) string k3("xyz"); FanOutExchange fanout("fanout"); - BOOST_CHECK(fanout.bind(a, "", 0)); - BOOST_CHECK(fanout.bind(b, "", 0)); - BOOST_CHECK(fanout.bind(c, "", 0)); + BOOST_CHECK(fanout.bind(a, "", 0, 0)); + BOOST_CHECK(fanout.bind(b, "", 0, 0)); + BOOST_CHECK(fanout.bind(c, "", 0, 0)); BOOST_CHECK(fanout.isBound(a, 0, 0)); BOOST_CHECK(fanout.isBound(b, 0, 0)); @@ -88,10 +88,10 @@ QPID_AUTO_TEST_CASE(testIsBound) BOOST_CHECK(!fanout.isBound(d, 0, 0)); DirectExchange direct("direct"); - BOOST_CHECK(direct.bind(a, k1, 0)); - BOOST_CHECK(direct.bind(a, k3, 0)); - BOOST_CHECK(direct.bind(b, k2, 0)); - BOOST_CHECK(direct.bind(c, k1, 0)); + BOOST_CHECK(direct.bind(a, k1, 0, 0)); + BOOST_CHECK(direct.bind(a, k3, 0, 0)); + BOOST_CHECK(direct.bind(b, k2, 0, 0)); + BOOST_CHECK(direct.bind(c, k1, 0, 0)); BOOST_CHECK(direct.isBound(a, 0, 0)); BOOST_CHECK(direct.isBound(a, &k1, 0)); @@ -106,10 +106,10 @@ QPID_AUTO_TEST_CASE(testIsBound) BOOST_CHECK(!direct.isBound(d, &k3, 0)); TopicExchange topic("topic"); - BOOST_CHECK(topic.bind(a, k1, 0)); - BOOST_CHECK(topic.bind(a, k3, 0)); - BOOST_CHECK(topic.bind(b, k2, 0)); - BOOST_CHECK(topic.bind(c, k1, 0)); + BOOST_CHECK(topic.bind(a, k1, 0, 0)); + BOOST_CHECK(topic.bind(a, k3, 0, 0)); + BOOST_CHECK(topic.bind(b, k2, 0, 0)); + BOOST_CHECK(topic.bind(c, k1, 0, 0)); BOOST_CHECK(topic.isBound(a, 0, 0)); BOOST_CHECK(topic.isBound(a, &k1, 0)); @@ -137,10 +137,10 @@ QPID_AUTO_TEST_CASE(testIsBound) args3.setString("c", "C"); args3.setInt("b", 6); - headers.bind(a, "", &args1); - headers.bind(a, "", &args3); - headers.bind(b, "", &args2); - headers.bind(c, "", &args1); + headers.bind(a, "", &args1, 0); + headers.bind(a, "", &args3, 0); + headers.bind(b, "", &args2, 0); + headers.bind(c, "", &args1, 0); BOOST_CHECK(headers.isBound(a, 0, 0)); BOOST_CHECK(headers.isBound(a, 0, &args1)); @@ -250,10 +250,10 @@ QPID_AUTO_TEST_CASE(testIVEOption) Queue::shared_ptr queue2(new Queue("queue2", true)); Queue::shared_ptr queue3(new Queue("queue3", true)); - BOOST_CHECK(direct.bind(queue, "abc", 0)); - BOOST_CHECK(fanout.bind(queue1, "abc", 0)); - BOOST_CHECK(header.bind(queue2, "", &args2)); - BOOST_CHECK(topic.bind(queue3, "abc", 0)); + BOOST_CHECK(direct.bind(queue, "abc", 0, 0)); + BOOST_CHECK(fanout.bind(queue1, "abc", 0, 0)); + BOOST_CHECK(header.bind(queue2, "", &args2, 0)); + BOOST_CHECK(topic.bind(queue3, "abc", 0, 0)); BOOST_CHECK_EQUAL(1u,queue->getMessageCount()); BOOST_CHECK_EQUAL(1u,queue1->getMessageCount()); diff --git a/cpp/src/tests/HeadersExchangeTest.cpp b/cpp/src/tests/HeadersExchangeTest.cpp index 40deb59c86..7c8ee4a2d9 100644 --- a/cpp/src/tests/HeadersExchangeTest.cpp +++ b/cpp/src/tests/HeadersExchangeTest.cpp @@ -109,7 +109,7 @@ QPID_AUTO_TEST_CASE(testBindNoXMatch) FieldTable args; try { //just checking this doesn't cause assertion etc - exchange.bind(queue, key, &args); + exchange.bind(queue, key, &args, 0); } catch(qpid::Exception&) { //expected } diff --git a/cpp/src/tests/QueueTest.cpp b/cpp/src/tests/QueueTest.cpp index 7b7c653029..d86c18c38d 100644 --- a/cpp/src/tests/QueueTest.cpp +++ b/cpp/src/tests/QueueTest.cpp @@ -100,15 +100,15 @@ QPID_AUTO_TEST_CASE(testBound){ ExchangeRegistry exchanges; //establish bindings from exchange->queue and notify the queue as it is bound: Exchange::shared_ptr exchange1 = exchanges.declare("my-exchange-1", "direct").first; - exchange1->bind(queue, key, &args); + exchange1->bind(queue, key, &args, 0); queue->bound(exchange1->getName(), key, args); Exchange::shared_ptr exchange2 = exchanges.declare("my-exchange-2", "fanout").first; - exchange2->bind(queue, key, &args); + exchange2->bind(queue, key, &args, 0); queue->bound(exchange2->getName(), key, args); Exchange::shared_ptr exchange3 = exchanges.declare("my-exchange-3", "topic").first; - exchange3->bind(queue, key, &args); + exchange3->bind(queue, key, &args, 0); queue->bound(exchange3->getName(), key, args); //delete one of the exchanges: |