Return-Path: Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: (qmail 53867 invoked from network); 25 Jun 2010 14:14:27 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 25 Jun 2010 14:14:27 -0000 Received: (qmail 59846 invoked by uid 500); 25 Jun 2010 14:14:26 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 59782 invoked by uid 500); 25 Jun 2010 14:14:26 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 59770 invoked by uid 99); 25 Jun 2010 14:14:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Jun 2010 14:14:26 +0000 X-ASF-Spam-Status: No, hits=-1487.9 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Jun 2010 14:14:24 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 264B12388BA2; Fri, 25 Jun 2010 14:13:33 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r957961 - in /activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration: ./ activemq/test/ activemq/test/openwire/ Date: Fri, 25 Jun 2010 14:13:33 -0000 To: commits@activemq.apache.org From: tabish@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100625141333.264B12388BA2@eris.apache.org> Author: tabish Date: Fri Jun 25 14:13:32 2010 New Revision: 957961 URL: http://svn.apache.org/viewvc?rev=957961&view=rev Log: Adds an integration test case for MapMessage use cases. Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/MapMessageTest.cpp (with props) activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/MapMessageTest.h (with props) activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireMapMessageTest.cpp (with props) activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireMapMessageTest.h (with props) Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/Makefile.am activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/TestRegistry.cpp Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/Makefile.am URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/Makefile.am?rev=957961&r1=957960&r2=957961&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/Makefile.am (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/Makefile.am Fri Jun 25 14:13:32 2010 @@ -22,6 +22,7 @@ cc_sources = \ activemq/test/DurableTest.cpp \ activemq/test/ExpirationTest.cpp \ activemq/test/JmsMessageGroupsTest.cpp \ + activemq/test/MapMessageTest.cpp \ activemq/test/MessageCompressionTest.cpp \ activemq/test/QueueBrowserTest.cpp \ activemq/test/SimpleRollbackTest.cpp \ @@ -36,6 +37,7 @@ cc_sources = \ activemq/test/openwire/OpenwireExpirationTest.cpp \ activemq/test/openwire/OpenwireIndividualAckTest.cpp \ activemq/test/openwire/OpenwireJmsMessageGroupsTest.cpp \ + activemq/test/openwire/OpenwireMapMessageTest.cpp \ activemq/test/openwire/OpenwireMessageCompressionTest.cpp \ activemq/test/openwire/OpenwireQueueBrowserTest.cpp \ activemq/test/openwire/OpenwireSimpleRollbackTest.cpp \ @@ -67,6 +69,7 @@ h_sources = \ activemq/test/DurableTest.h \ activemq/test/ExpirationTest.h \ activemq/test/JmsMessageGroupsTest.h \ + activemq/test/MapMessageTest.h \ activemq/test/MessageCompressionTest.h \ activemq/test/QueueBrowserTest.h \ activemq/test/SimpleRollbackTest.h \ @@ -81,6 +84,7 @@ h_sources = \ activemq/test/openwire/OpenwireExpirationTest.h \ activemq/test/openwire/OpenwireIndividualAckTest.h \ activemq/test/openwire/OpenwireJmsMessageGroupsTest.h \ + activemq/test/openwire/OpenwireMapMessageTest.h \ activemq/test/openwire/OpenwireMessageCompressionTest.h \ activemq/test/openwire/OpenwireQueueBrowserTest.h \ activemq/test/openwire/OpenwireSimpleRollbackTest.h \ Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/TestRegistry.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/TestRegistry.cpp?rev=957961&r1=957960&r2=957961&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/TestRegistry.cpp (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/TestRegistry.cpp Fri Jun 25 14:13:32 2010 @@ -22,6 +22,7 @@ #include "activemq/test/openwire/OpenwireExpirationTest.h" #include "activemq/test/openwire/OpenwireIndividualAckTest.h" #include "activemq/test/openwire/OpenwireMessageCompressionTest.h" +#include "activemq/test/openwire/OpenwireMapMessageTest.h" #include "activemq/test/openwire/OpenwireQueueBrowserTest.h" #include "activemq/test/openwire/OpenwireSimpleRollbackTest.h" #include "activemq/test/openwire/OpenwireSimpleTest.h" @@ -49,6 +50,7 @@ CPPUNIT_TEST_SUITE_REGISTRATION( activem CPPUNIT_TEST_SUITE_REGISTRATION( activemq::test::openwire::OpenwireExpirationTest ); CPPUNIT_TEST_SUITE_REGISTRATION( activemq::test::openwire::OpenwireIndividualAckTest ); CPPUNIT_TEST_SUITE_REGISTRATION( activemq::test::openwire::OpenwireMessageCompressionTest ); +CPPUNIT_TEST_SUITE_REGISTRATION( activemq::test::openwire::OpenwireMapMessageTest ); CPPUNIT_TEST_SUITE_REGISTRATION( activemq::test::openwire::OpenwireQueueBrowserTest ); CPPUNIT_TEST_SUITE_REGISTRATION( activemq::test::openwire::OpenwireSimpleRollbackTest ); CPPUNIT_TEST_SUITE_REGISTRATION( activemq::test::openwire::OpenwireSimpleTest ); Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/MapMessageTest.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/MapMessageTest.cpp?rev=957961&view=auto ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/MapMessageTest.cpp (added) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/MapMessageTest.cpp Fri Jun 25 14:13:32 2010 @@ -0,0 +1,65 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "MapMessageTest.h" + +#include +#include +#include +#include + +using namespace std; +using namespace cms; +using namespace activemq; +using namespace activemq::commands; +using namespace activemq::core; +using namespace activemq::test; +using namespace activemq::util; +using namespace activemq::exceptions; +using namespace decaf; +using namespace decaf::lang; +using namespace decaf::util; + +//////////////////////////////////////////////////////////////////////////////// +MapMessageTest::MapMessageTest() { +} + +//////////////////////////////////////////////////////////////////////////////// +MapMessageTest::~MapMessageTest() { +} + +//////////////////////////////////////////////////////////////////////////////// +void MapMessageTest::testEmptyMapSendReceive() { + + // Create CMS Object for Comms + cms::Session* session( cmsProvider->getSession() ); + cms::MessageConsumer* consumer = cmsProvider->getConsumer(); + cms::MessageProducer* producer = cmsProvider->getProducer(); + producer->setDeliveryMode( DeliveryMode::NON_PERSISTENT ); + + auto_ptr mapMessage( session->createMapMessage() ); + + // Send some text messages + producer->send( mapMessage.get() ); + + auto_ptr message( consumer->receive( 2000 ) ); + CPPUNIT_ASSERT( message.get() != NULL ); + + cms::MapMessage* recvMapMessage = dynamic_cast( message.get() ); + CPPUNIT_ASSERT( recvMapMessage != NULL ); + CPPUNIT_ASSERT( recvMapMessage->itemExists( "SomeKey" ) == false ); +} Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/MapMessageTest.cpp ------------------------------------------------------------------------------ svn:eol-style = native Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/MapMessageTest.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/MapMessageTest.h?rev=957961&view=auto ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/MapMessageTest.h (added) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/MapMessageTest.h Fri Jun 25 14:13:32 2010 @@ -0,0 +1,39 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _ACTIVEMQ_TEST_MAPMESSAGETEST_H_ +#define _ACTIVEMQ_TEST_MAPMESSAGETEST_H_ + +#include +#include + +namespace activemq { +namespace test { + + class MapMessageTest : public CMSTestFixture { + public: + + MapMessageTest(); + virtual ~MapMessageTest(); + + void testEmptyMapSendReceive(); + + }; + +}} + +#endif /* _ACTIVEMQ_TEST_MAPMESSAGETEST_H_ */ Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/MapMessageTest.h ------------------------------------------------------------------------------ svn:eol-style = native Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireMapMessageTest.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireMapMessageTest.cpp?rev=957961&view=auto ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireMapMessageTest.cpp (added) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireMapMessageTest.cpp Fri Jun 25 14:13:32 2010 @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "OpenwireMapMessageTest.h" + +using namespace activemq; +using namespace activemq::test; +using namespace activemq::test::openwire; + +//////////////////////////////////////////////////////////////////////////////// +OpenwireMapMessageTest::OpenwireMapMessageTest() { +} + +//////////////////////////////////////////////////////////////////////////////// +OpenwireMapMessageTest::~OpenwireMapMessageTest() { +} Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireMapMessageTest.cpp ------------------------------------------------------------------------------ svn:eol-style = native Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireMapMessageTest.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireMapMessageTest.h?rev=957961&view=auto ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireMapMessageTest.h (added) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireMapMessageTest.h Fri Jun 25 14:13:32 2010 @@ -0,0 +1,46 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _ACTIVEMQ_TEST_OPENWIRE_OPENWIREMAPMESSAGETEST_H_ +#define _ACTIVEMQ_TEST_OPENWIRE_OPENWIREMAPMESSAGETEST_H_ + +#include + +namespace activemq { +namespace test { +namespace openwire { + + class OpenwireMapMessageTest : public MapMessageTest { + private: + + CPPUNIT_TEST_SUITE( OpenwireMapMessageTest ); + CPPUNIT_TEST( testEmptyMapSendReceive ); + CPPUNIT_TEST_SUITE_END(); + + public: + + OpenwireMapMessageTest(); + virtual ~OpenwireMapMessageTest(); + + virtual std::string getBrokerURL() const { + return activemq::util::IntegrationCommon::getInstance().getOpenwireURL(); + } + }; + +}}} + +#endif /* _ACTIVEMQ_TEST_OPENWIRE_OPENWIREMAPMESSAGETEST_H_ */ Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireMapMessageTest.h ------------------------------------------------------------------------------ svn:eol-style = native