You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by fo...@apache.org on 2006/10/09 12:06:44 UTC
svn commit: r454326 -
/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JmsSendReceiveWithMessageExpirationTest.java
Author: foconer
Date: Mon Oct 9 03:06:40 2006
New Revision: 454326
URL: http://svn.apache.org/viewvc?view=rev&rev=454326
Log:
Minor correction on comments.
Modified:
incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JmsSendReceiveWithMessageExpirationTest.java
Modified: incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JmsSendReceiveWithMessageExpirationTest.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JmsSendReceiveWithMessageExpirationTest.java?view=diff&rev=454326&r1=454325&r2=454326
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JmsSendReceiveWithMessageExpirationTest.java (original)
+++ incubator/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JmsSendReceiveWithMessageExpirationTest.java Mon Oct 9 03:06:40 2006
@@ -70,7 +70,7 @@
}
/**
- * Sends and consumes the messages to a queue destination.
+ * Test consuming an expired queue.
*
* @throws Exception
*/
@@ -98,7 +98,9 @@
producer.send(producerDestination, message);
}
- Thread.sleep(timeToLive + 1000);
+ // sleeps a second longer than the expiration time.
+ // Basically waits till queue expires.
+ Thread.sleep(timeToLive + 1000);
// message should have expired.
assertNull(consumer.receive(1000));
@@ -133,12 +135,12 @@
producer.send(producerDestination, message);
}
- // message should have expired.
+ // should receive a queue since there is no expiration.
assertNotNull(consumer.receive(1000));
}
/**
- * Sends and consumes the messages to a topic destination.
+ * Test consuming an expired topic.
*
* @throws Exception
*/
@@ -166,7 +168,9 @@
producer.send(producerDestination, message);
}
- Thread.sleep(timeToLive + 1000);
+ // sleeps a second longer than the expiration time.
+ // Basically waits till topic expires.
+ Thread.sleep(timeToLive + 1000);
// message should have expired.
assertNull(consumer.receive(1000));
@@ -201,7 +205,7 @@
producer.send(producerDestination, message);
}
- // message should have expired.
+ // should receive a topic since there is no expiration.
assertNotNull(consumer.receive(1000));
}
@@ -224,11 +228,9 @@
}
protected void tearDown() throws Exception {
- log.info("Dumping stats...");
-
+ log.info("Dumping stats...");
log.info("Closing down connection");
- /** TODO we should be able to shut down properly */
session.close();
connection.close();
}