[
https://issues.apache.org/jira/browse/ARTEMIS-3243?focusedWorklogId=619943&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-619943
]
ASF GitHub Bot logged work on ARTEMIS-3243:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 07/Jul/21 12:27
Start Date: 07/Jul/21 12:27
Worklog Time Spent: 10m
Work Description: gemmellr commented on a change in pull request #3633:
URL: https://github.com/apache/activemq-artemis/pull/3633#discussion_r665321628
##########
File path:
artemis-commons/src/test/java/org/apache/activemq/artemis/utils/ByteUtilTest.java
##########
@@ -39,6 +39,15 @@
private static Logger log = Logger.getLogger(ByteUtilTest.class);
+ @Test
+ public void testBytesToLong() {
+ long randomA = RandomUtil.randomLong();
+ byte[] randomABytes = ByteUtil.longToBytes(randomA);
+ long randomAOutput = ByteUtil.bytesToLong(randomABytes);
+
+ Assert.assertEquals(randomA, randomAOutput);
Review comment:
I realise it wasnt about endianness, that was merely giving an example
relating to the comment that doing a roundtrip comparison though 2 methods
generally not being a great test, a potentially compensating change that could
happen in both sides and which the roundtrip test wouldnt detect issue with
despite it likely totally breaking intended uses of the methods. Something a
'specific known input, specific known output' test would detect and fail
immediately upon, unless updated because the change was expected and methods
tests were similarly being updated accordingly.
Using >>> or >> are both 'right' if they are being used appropriately. I
still dont think the previous change to the class made any difference given how
the shifts and intermediate results were being used (not storing full shifted
values, never referencing shifted-in bits that could be different).
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 619943)
Time Spent: 14h 50m (was: 14h 40m)
> Enhance AMQP Mirror support with dual mirror
> --------------------------------------------
>
> Key: ARTEMIS-3243
> URL: https://issues.apache.org/jira/browse/ARTEMIS-3243
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Affects Versions: 2.17.0
> Reporter: Clebert Suconic
> Assignee: Clebert Suconic
> Priority: Major
> Fix For: 2.18.0
>
> Time Spent: 14h 50m
> Remaining Estimate: 0h
>
> at the current Mirror version, we can only mirror into a single direction.
> With this enhancement the two (or more brokers) would be connected to each
> other, each one having its own ID, and each one would send updates to the
> other broker.
> The outcome is that if you just transferred producers and consumers from one
> broker into the other, the fallback would be automatic and simple. No need to
> disable and enable mirror options.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)