Author: gordonsim
Date: 2008-04-25 04:22:27 -0400 (Fri, 25 Apr 2008)
New Revision: 1982
Modified:
store/trunk/cpp/tests/SimpleTest.cpp
Log:
Fixed caught exception type
Modified: store/trunk/cpp/tests/SimpleTest.cpp
===================================================================
--- store/trunk/cpp/tests/SimpleTest.cpp 2008-04-24 21:15:49 UTC (rev 1981)
+++ store/trunk/cpp/tests/SimpleTest.cpp 2008-04-25 08:22:27 UTC (rev 1982)
@@ -230,8 +230,8 @@
BOOST_REQUIRE_EQUAL((u_int64_t) 14, msg->contentSize());
DummyHandler handler;
- QueuedMessage qm(queue.get(),msg,0);
- MessageDelivery::deliver(qm, handler, 0,
MessageDelivery::getBasicConsumeToken("ignore"), 100);
+ QueuedMessage qm(queue.get(),msg,0);
+ MessageDelivery::deliver(qm, handler, 0,
MessageDelivery::getMessageDeliveryToken("ignore", 0, 0), 100);
BOOST_REQUIRE_EQUAL((size_t) 3, handler.frames.size());
AMQContentBody*
contentBody(dynamic_cast<AMQContentBody*>(handler.frames[2].getBody()));
BOOST_REQUIRE(contentBody);
@@ -312,8 +312,8 @@
//load it (without recovery)
DummyHandler handler;
QueuedMessage qm(queue.get(), msg, 0);
- MessageDelivery::deliver(qm, handler, 0,
-
MessageDelivery::getBasicConsumeToken("ignore"), 20);//52 chars of data, i.e. 2
chunks of 20 and one of 12
+ //52 chars of data, i.e. 2 chunks of 20 and one of 12
+ MessageDelivery::deliver(qm, handler, 0,
MessageDelivery::getMessageDeliveryToken("ignore", 0, 0), 20);
BOOST_REQUIRE(handler.frames.size() > 2);
string loaded;
for (uint i = 2; i < handler.frames.size(); i++) {
@@ -355,7 +355,7 @@
//load lazily
DummyHandler handler;
QueuedMessage qm(queue.get(),msg,0);
- MessageDelivery::deliver(qm, handler, 0,
MessageDelivery::getBasicConsumeToken("ignore"), 20);//52 chars of data, i.e. 2
chunks of 20 and one of 12
+ MessageDelivery::deliver(qm, handler, 0,
MessageDelivery::getMessageDeliveryToken("ignore", 0, 0), 20);//52 chars of
data, i.e. 2 chunks of 20 and one of 12
BOOST_REQUIRE(handler.frames.size() > 2);
string loaded;
@@ -462,7 +462,7 @@
try {
Exchange::shared_ptr exchange = registry.get(name);
BOOST_FAIL("Expected exchange not to be found");
- } catch (ChannelException& e) {
+ } catch (const SessionException& e) {
BOOST_REQUIRE_EQUAL((framing::ReplyCode) 404, e.code);
}
}
@@ -574,7 +574,7 @@
try {
Exchange::shared_ptr exchange = exchanges.get(exchangeName);
BOOST_FAIL("Expected exchange not to be found");
- } catch (ChannelException& e) {
+ } catch (const SessionException& e) {
BOOST_REQUIRE_EQUAL((framing::ReplyCode) 404, e.code);
}
Queue::shared_ptr queue = queues.find(queueName2);