nileshkumar3 commented on code in PR #21726:
URL: https://github.com/apache/kafka/pull/21726#discussion_r2931378970
##########
clients/src/test/java/org/apache/kafka/common/feature/FeaturesTest.java:
##########
@@ -89,10 +88,8 @@ public void testFromFeaturesMapToFeaturesMap() {
public void testToStringSupportedFeatures() {
SupportedVersionRange v1 = new SupportedVersionRange((short) 1,
(short) 2);
SupportedVersionRange v2 = new SupportedVersionRange((short) 3,
(short) 4);
- Map<String, SupportedVersionRange> allFeatures
- = mkMap(mkEntry("feature_1", v1), mkEntry("feature_2", v2));
-
- Features<SupportedVersionRange> features =
Features.supportedFeatures(allFeatures);
+ Features<SupportedVersionRange> features = Features.supportedFeatures(
Review Comment:
Since the test asserts the exact toString() output, relying on Map.of might
be brittle as its iteration order is not guaranteed. Using mkMap
(LinkedHashMap) keeps the order determinist
--
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]