[ 
https://issues.apache.org/jira/browse/ARTEMIS-2681?focusedWorklogId=410123&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-410123
 ]

ASF GitHub Bot logged work on ARTEMIS-2681:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 26/Mar/20 07:41
            Start Date: 26/Mar/20 07:41
    Worklog Time Spent: 10m 
      Work Description: franz1981 commented on pull request #3049: ARTEMIS-2681 
timestamp not set on notif msgs
URL: https://github.com/apache/activemq-artemis/pull/3049#discussion_r398367732
 
 

 ##########
 File path: 
tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/NotificationTest.java
 ##########
 @@ -79,13 +79,17 @@ public void testBINDING_ADDED() throws Exception {
 
       NotificationTest.flush(notifConsumer);
 
+      long start = System.currentTimeMillis();
       session.createQueue(address, queue, durable);
 
       //the first message received will be for the address creation
       ClientMessage[] notifications = NotificationTest.consumeMessages(2, 
notifConsumer);
       Assert.assertEquals(BINDING_ADDED.toString(), 
notifications[1].getObjectProperty(ManagementHelper.HDR_NOTIFICATION_TYPE).toString());
       Assert.assertEquals(queue.toString(), 
notifications[1].getObjectProperty(ManagementHelper.HDR_ROUTING_NAME).toString());
       Assert.assertEquals(address.toString(), 
notifications[1].getObjectProperty(ManagementHelper.HDR_ADDRESS).toString());
+      Assert.assertTrue(notifications[1].getTimestamp() > start);
+      Assert.assertTrue((long) 
notifications[1].getObjectProperty(ManagementHelper.HDR_NOTIFICATION_TIMESTAMP) 
>= start);
 
 Review comment:
   I would use Assert.assertThat and Matchers.greaterXXX so when it fails we 
have a more communicative error (that is just a lil' thing but I have 
introduced the core matchers of hamcrest for this reason some time ago)
 
----------------------------------------------------------------
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:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 410123)
    Time Spent: 1h  (was: 50m)

> Timestamp not set on notification messages
> ------------------------------------------
>
>                 Key: ARTEMIS-2681
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-2681
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>            Reporter: Justin Bertram
>            Assignee: Justin Bertram
>            Priority: Minor
>          Time Spent: 1h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to