You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2012/10/12 23:01:30 UTC
svn commit: r1397720 -
/activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireTempDestinationTest.cpp
Author: tabish
Date: Fri Oct 12 21:01:30 2012
New Revision: 1397720
URL: http://svn.apache.org/viewvc?rev=1397720&view=rev
Log:
Update the test now that we throw the correct CMS Exceptions
Modified:
activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireTempDestinationTest.cpp
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireTempDestinationTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireTempDestinationTest.cpp?rev=1397720&r1=1397719&r2=1397720&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireTempDestinationTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireTempDestinationTest.cpp Fri Oct 12 21:01:30 2012
@@ -357,6 +357,8 @@ void OpenwireTempDestinationTest::testPu
std::auto_ptr<Session> tempSession(tempConnection->createSession());
std::auto_ptr<TemporaryQueue> queue(tempSession->createTemporaryQueue());
+ Thread::sleep(2000);
+
// This message delivery should work since the temp connection is still open.
std::auto_ptr<MessageProducer> producer(cmsProvider->getSession()->createProducer(queue.get()));
producer->setDeliveryMode(DeliveryMode::NON_PERSISTENT);
@@ -371,9 +373,9 @@ void OpenwireTempDestinationTest::testPu
message.reset(cmsProvider->getSession()->createTextMessage("Hello"));
CPPUNIT_ASSERT_THROW_MESSAGE(
- "Should throw a CMSException since temp destination should not exist anymore.",
+ "Should throw a InvalidDestinationException since temp destination should not exist anymore.",
producer->send(message.get()),
- CMSException);
+ cms::InvalidDestinationException);
}
///////////////////////////////////////////////////////////////////////////////
@@ -389,6 +391,8 @@ void OpenwireTempDestinationTest::testPu
std::auto_ptr<Session> tempSession(tempConnection->createSession());
std::auto_ptr<TemporaryQueue> queue(tempSession->createTemporaryQueue());
+ Thread::sleep(2000);
+
// This message delivery should work since the temp connection is still open.
std::auto_ptr<MessageProducer> producer(cmsProvider->getSession()->createProducer(queue.get()));
producer->setDeliveryMode(DeliveryMode::NON_PERSISTENT);
@@ -403,9 +407,9 @@ void OpenwireTempDestinationTest::testPu
message.reset(cmsProvider->getSession()->createTextMessage("Hello"));
CPPUNIT_ASSERT_THROW_MESSAGE(
- "Should throw a CMSException since temp destination should not exist anymore.",
+ "Should throw a InvalidDestinationException since temp destination should not exist anymore.",
producer->send(message.get()),
- CMSException);
+ InvalidDestinationException);
}
///////////////////////////////////////////////////////////////////////////////