junrao commented on code in PR #16183:
URL: https://github.com/apache/kafka/pull/16183#discussion_r1688638549


##########
metadata/src/test/java/org/apache/kafka/controller/QuorumFeaturesTest.java:
##########
@@ -58,10 +61,13 @@ public void testDefaultFeatureMap() {
             MetadataVersion.MINIMUM_KRAFT_VERSION.featureLevel(),
             MetadataVersion.LATEST_PRODUCTION.featureLevel()));
         for (Features feature : Features.PRODUCTION_FEATURES) {
-            expectedFeatures.put(feature.featureName(), VersionRange.of(
-                0,
-                feature.defaultValue(MetadataVersion.LATEST_PRODUCTION)
-            ));
+            short maxVersion = 
feature.defaultValue(MetadataVersion.LATEST_PRODUCTION);
+            if (maxVersion > 0) {
+                expectedFeatures.put(feature.featureName(), VersionRange.of(
+                    feature.minimumProduction(),
+                    maxVersion
+                ));

Review Comment:
   The code in the test is pretty much the same as the actual code. Does this 
and the next test add much value?



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to