activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nmitt...@apache.org
Subject svn commit: r486939 - /incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/integration/expiration/ExpirationTest.cpp
Date Thu, 14 Dec 2006 02:53:04 GMT
Author: nmittler
Date: Wed Dec 13 18:53:03 2006
New Revision: 486939

URL: http://svn.apache.org/viewvc?view=rev&rev=486939
Log:
tweak to expiration test to allow multiple successive runs without collision with previous
runs

Modified:
    incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/integration/expiration/ExpirationTest.cpp

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/integration/expiration/ExpirationTest.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/integration/expiration/ExpirationTest.cpp?view=diff&rev=486939&r1=486938&r2=486939
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/integration/expiration/ExpirationTest.cpp
(original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/test-integration/integration/expiration/ExpirationTest.cpp
Wed Dec 13 18:53:03 2006
@@ -80,6 +80,8 @@
 using namespace integration::expiration;
 using namespace integration::common;
 
+std::string messageTag = Guid().createGUID();
+
 class Producer : public Runnable {
 private:
 
@@ -146,6 +148,7 @@
 
             for( int ix=0; ix<numMessages; ++ix ){
                 TextMessage* message = session->createTextMessage( text );
+                message->setStringProperty( "messageTag", messageTag );
                 producer->send( message );
                 delete message;
            }
@@ -258,6 +261,11 @@
 
         try
         {
+            if( !message->propertyExists( "messageTag" ) || 
+                message->getStringProperty("messageTag") != messageTag ){
+                return;
+            }
+            
             const TextMessage* textMessage =
                 dynamic_cast< const TextMessage* >( message );
             string text = textMessage->getText();



Mime
View raw message