kevin-wu24 commented on code in PR #18304:
URL: https://github.com/apache/kafka/pull/18304#discussion_r1934700897


##########
raft/src/test/java/org/apache/kafka/raft/KafkaRaftClientReconfigTest.java:
##########
@@ -2351,4 +2459,21 @@ private static ApiVersionsResponseData 
apiVersionsResponse(Errors error, Support
             .setErrorCode(error.code())
             .setSupportedFeatures(supportedFeatures);
     }
+
+    private static KafkaMetric getMetric(final Metrics metrics, final String 
name) {
+        return metrics.metrics().get(metrics.metricName(name, "raft-metrics"));
+    }
+
+    private static void checkLeaderMetricValues(
+        final int expectedVoters,
+        final int expectedObservers,
+        final boolean expectedUncommittedVoterChange,
+        final boolean expectedIgnoredStaticVoters,

Review Comment:
   I can add a test where we:
   1. set bootstrap records which define the voter set via a snapshot
   2. explicitly set `isStartingVotersStatic` to be true so the test's 
RaftClient has static voters
   This test does expect this metric value to be `true` after the client is set 
up, but the snapshot voter set and the RaftClient's static voters are the same 
set because of how we implement `RaftClientTestContext`.



-- 
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