[
https://issues.apache.org/jira/browse/ARTEMIS-5769?focusedWorklogId=995721&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-995721
]
ASF GitHub Bot logged work on ARTEMIS-5769:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 11/Dec/25 06:40
Start Date: 11/Dec/25 06:40
Worklog Time Spent: 10m
Work Description: brusdev commented on code in PR #6119:
URL: https://github.com/apache/artemis/pull/6119#discussion_r2609368118
##########
tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlTest.java:
##########
@@ -4385,10 +4386,9 @@ public void testListConsumers() throws Exception {
assertNotEquals("",
jsonConsumer.getString(ConsumerField.MESSAGES_DELIVERED.getName()),
"messagesDelivered");
assertNotEquals("",
jsonConsumer.getString(ConsumerField.MESSAGES_DELIVERED_SIZE.getName()),
"messagesDeliveredSize");
assertNotEquals("",
jsonConsumer.getString(ConsumerField.MESSAGES_ACKNOWLEDGED.getName()),
"messagesAcknowledged");
- assertEquals(0,
jsonConsumer.getInt(ConsumerField.LAST_DELIVERED_TIME.getName()),
"lastDeliveredTime");
- assertEquals(0,
jsonConsumer.getInt(ConsumerField.LAST_ACKNOWLEDGED_TIME.getName()),
"lastAcknowledgedTime");
+ assertNotEquals("",
jsonConsumer.getString(ConsumerField.LAST_DELIVERED_TIME.getName()),
"lastDeliveredTime");
+ assertNotEquals("",
jsonConsumer.getString(ConsumerField.LAST_ACKNOWLEDGED_TIME.getName()),
"lastAcknowledgedTime");
Review Comment:
Some users also use the management API via the jolokia endpoint in JSON
format. The most commonly used JSON alternatives for timestamps are ISO 8601
strings and Unix epochs, because they are easier to parse.
I'm in favor of moving the final output formatting to the web console
because it would allow applying the user's local settings to the output format.
Issue Time Tracking
-------------------
Worklog Id: (was: 995721)
Time Spent: 50m (was: 40m)
> Standardize date-time strings for web console
> ---------------------------------------------
>
> Key: ARTEMIS-5769
> URL: https://issues.apache.org/jira/browse/ARTEMIS-5769
> Project: Artemis
> Issue Type: Task
> Reporter: Justin Bertram
> Assignee: Justin Bertram
> Priority: Major
> Labels: pull-request-available
> Fix For: 2.45.0
>
> Time Spent: 50m
> Remaining Estimate: 0h
>
> Currently many of the fields requested by the web console that contain
> date-time info are formatted on the broker using:
> {code:java}
> new Date(long).toString(){code}
> This results in output like this:
> {noformat}
> Wed Dec 31 18:00:00 CST 1969{noformat}
> This results in unnecessary garbage in the JVM heap and uses an implicit
> format. It would be better to use an explicit format and avoid any garbage in
> the heap.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]