-
Notifications
You must be signed in to change notification settings - Fork 14.6k
MINOR: Small cleanups in clients #20530
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Conversation
69ed804
to
768b31b
Compare
There was a problem hiding this 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); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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);
There was a problem hiding this 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() { |
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
Uh oh!
There was an error while loading. Please reload this page.