Minor correction on comments.

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@454326 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Frederick G. Oconer 2006-10-09 10:06:40 +00:00
parent ff7bee0e49
commit 4208134b5e
1 changed files with 11 additions and 9 deletions

View File

@ -70,7 +70,7 @@ public class JmsSendReceiveWithMessageExpirationTest extends TestSupport {
} }
/** /**
* Sends and consumes the messages to a queue destination. * Test consuming an expired queue.
* *
* @throws Exception * @throws Exception
*/ */
@ -98,6 +98,8 @@ public class JmsSendReceiveWithMessageExpirationTest extends TestSupport {
producer.send(producerDestination, message); producer.send(producerDestination, message);
} }
// sleeps a second longer than the expiration time.
// Basically waits till queue expires.
Thread.sleep(timeToLive + 1000); Thread.sleep(timeToLive + 1000);
// message should have expired. // message should have expired.
@ -133,12 +135,12 @@ public class JmsSendReceiveWithMessageExpirationTest extends TestSupport {
producer.send(producerDestination, message); producer.send(producerDestination, message);
} }
// message should have expired. // should receive a queue since there is no expiration.
assertNotNull(consumer.receive(1000)); assertNotNull(consumer.receive(1000));
} }
/** /**
* Sends and consumes the messages to a topic destination. * Test consuming an expired topic.
* *
* @throws Exception * @throws Exception
*/ */
@ -166,6 +168,8 @@ public class JmsSendReceiveWithMessageExpirationTest extends TestSupport {
producer.send(producerDestination, message); producer.send(producerDestination, message);
} }
// sleeps a second longer than the expiration time.
// Basically waits till topic expires.
Thread.sleep(timeToLive + 1000); Thread.sleep(timeToLive + 1000);
// message should have expired. // message should have expired.
@ -201,7 +205,7 @@ public class JmsSendReceiveWithMessageExpirationTest extends TestSupport {
producer.send(producerDestination, message); producer.send(producerDestination, message);
} }
// message should have expired. // should receive a topic since there is no expiration.
assertNotNull(consumer.receive(1000)); assertNotNull(consumer.receive(1000));
} }
@ -225,10 +229,8 @@ public class JmsSendReceiveWithMessageExpirationTest extends TestSupport {
protected void tearDown() throws Exception { protected void tearDown() throws Exception {
log.info("Dumping stats..."); log.info("Dumping stats...");
log.info("Closing down connection"); log.info("Closing down connection");
/** TODO we should be able to shut down properly */
session.close(); session.close();
connection.close(); connection.close();
} }