jbertram commented on a change in pull request #3279:
URL: https://github.com/apache/activemq-artemis/pull/3279#discussion_r645812586



##########
File path: 
tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompTest.java
##########
@@ -709,6 +709,27 @@ public void testSubscribeWithAutoAck() throws Exception {
 
    }
 
+   @Test
+   public void testIngressTimestamp() throws Exception {
+      server.getAddressSettingsRepository().addMatch("#", new 
AddressSettings().setEnableIngressTime(true));
+      conn.connect(defUser, defPass);
+
+      subscribe(conn, null, Stomp.Headers.Subscribe.AckModeValues.AUTO);
+      long before = System.currentTimeMillis();
+      sendJmsMessage(getName());
+      long after = System.currentTimeMillis();
+
+      ClientStompFrame frame = conn.receiveFrame(10000);
+      Assert.assertEquals(Stomp.Responses.MESSAGE, frame.getCommand());
+      Assert.assertEquals(getQueuePrefix() + getQueueName(), 
frame.getHeader(Stomp.Headers.Send.DESTINATION));
+      String ingressTimeHeaderValue = 
frame.getHeader(Stomp.Headers.Message.INGRESS_TIME);
+      Assert.assertNotNull(ingressTimeHeaderValue);
+      long ingressTime = Long.parseLong(ingressTimeHeaderValue);
+      assertTrue("Ingress time should be set in expected range", before <= 
ingressTime && after >= ingressTime);

Review comment:
       Fixed




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to