racorn opened a new issue #6433: MessageId#compare is not symmetric (MessageIdImpl, BatchMessageIdImpl) URL: https://github.com/apache/pulsar/issues/6433 **Describe the bug** Given to `MessageId`s, of which one happens to be a `MessageIdImpl` and the other is a `BatchMessageIdImpl`, the compare method is not symmetric. **To Reproduce** ``` import static org.assertj.core.api.Assertions.assertThat; @Test public void shouldBeSymmetric() { MessageIdImpl simpleMessageId = new MessageIdImpl(1, 2, 3); BatchMessageIdImpl batchMessageId = new BatchMessageIdImpl(1, 2, 3, 0); assertThat(simpleMessageId.compareTo(batchMessageId)).isEqualTo(batchMessageId.compareTo(simpleMessageId)); } ``` **Expected behavior** MessageId#compare should be symmetric **Additional context** Pulsar 2.5.0
---------------------------------------------------------------- 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] With regards, Apache Git Services
