mirror of https://github.com/apache/activemq.git
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.
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1451323 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7a15915238
commit
d98c3e0249
|
@ -1854,14 +1854,14 @@ public class StompTest extends StompTestSupport {
|
|||
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());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue