DL1231 commented on code in PR #21726:
URL: https://github.com/apache/kafka/pull/21726#discussion_r2936269367
##########
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:
I've switched to `Map.of()` here. However, since `Map.of()` doesn't
guarantee iteration order and `Features.toString()` depends on it, I also
changed the assertion to use contains checks instead of exact string matching
to avoid flakiness across JDK versions.
--
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]