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 2013/02/28 21:08:57 UTC
svn commit: r1451323 -
/activemq/trunk/activemq-stomp/src/test/java/org/apache/activemq/transport/stomp/StompTest.java
Author: tabish
Date: Thu Feb 28 20:08:57 2013
New Revision: 1451323
URL: http://svn.apache.org/r1451323
Log:
Older Windows machine have a slow clock tick interval so make sure the message immediately expires. In case it still doesn't make it wait long enough for the next sweep to remove expired messages from the Queue.
Modified:
activemq/trunk/activemq-stomp/src/test/java/org/apache/activemq/transport/stomp/StompTest.java
Modified: activemq/trunk/activemq-stomp/src/test/java/org/apache/activemq/transport/stomp/StompTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-stomp/src/test/java/org/apache/activemq/transport/stomp/StompTest.java?rev=1451323&r1=1451322&r2=1451323&view=diff
==============================================================================
--- activemq/trunk/activemq-stomp/src/test/java/org/apache/activemq/transport/stomp/StompTest.java (original)
+++ activemq/trunk/activemq-stomp/src/test/java/org/apache/activemq/transport/stomp/StompTest.java Thu Feb 28 20:08:57 2013
@@ -1854,14 +1854,14 @@ public class StompTest extends StompTest
stompConnection.connect("system", "manager");
HashMap<String, String> headers = new HashMap<String, String>();
- long timestamp = System.currentTimeMillis();
+ long timestamp = System.currentTimeMillis() - 100;
headers.put(Stomp.Headers.Message.EXPIRATION_TIME, String.valueOf(timestamp));
headers.put(Stomp.Headers.Send.PERSISTENT, "true");
stompConnection.send("/queue/" + getQueueName(), "msg", null, headers);
stompConnection.subscribe("/queue/ActiveMQ.DLQ");
- StompFrame stompMessage = stompConnection.receive(10000);
+ StompFrame stompMessage = stompConnection.receive(35000);
assertNotNull(stompMessage);
assertEquals(stompMessage.getHeaders().get(Stomp.Headers.Message.ORIGINAL_DESTINATION), "/queue/" + getQueueName());
}