Skip to content

Conversation

mimaison
Copy link
Member

@mimaison mimaison commented Sep 12, 2025

  • Fix non-constant calls to logging
  • Fix assertEquals order
  • Fix javadoc

Copy link
Member

@chia7712 chia7712 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mimaison thanks for this cleanup!

@@ -202,7 +202,7 @@ private void handlePartitionError(
public Map<TopicPartition, Throwable> handleUnsupportedVersionException(
int brokerId, UnsupportedVersionException exception, Set<TopicPartition> keys
) {
log.warn("Broker " + brokerId + " does not support MAX_TIMESTAMP offset specs");
log.warn("Broker {} does not support MAX_TIMESTAMP offset specs", brokerId);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is quite interesting. Right now it only deals with MAX_TIMESTAMP, while other timestamp placeholders are just unused. I think it is okay to keep the change for now, and I will follow up with a JIRA for the rest

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -74,7 +74,7 @@ public void testStringConversion() {

String zeroIdString = Uuid.ZERO_UUID.toString();

assertEquals(Uuid.fromString(zeroIdString), Uuid.ZERO_UUID);
assertEquals(Uuid.ZERO_UUID, Uuid.fromString(zeroIdString));
}

@RepeatedTest(value = 100, name = RepeatedTest.LONG_DISPLAY_NAME)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like lines 84 and 85 run into the same issue as well

        assertNotEquals(randomID, Uuid.ZERO_UUID);
        assertNotEquals(randomID, Uuid.METADATA_TOPIC_ID);

Copy link
Contributor

@frankvicky frankvicky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mimaison: Thanks for the patch.

@@ -279,7 +279,7 @@ public void testSearch() throws IOException {
* Test that the message set iterator obeys start and end slicing
*/
@Test
public void testIteratorWithLimits() throws IOException {
public void testIteratorWithLimits() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of the FileRecords are not closed during the test; should we also clean them?
L368, L382

@@ -46,8 +46,8 @@ public void testSameRackSelector() {
ReplicaSelector selector = new RackAwareReplicaSelector();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants