andymg3 commented on code in PR #13788: URL: https://github.com/apache/kafka/pull/13788#discussion_r1212980304
########## metadata/src/test/java/org/apache/kafka/controller/PartitionChangeBuilderTest.java: ########## @@ -77,39 +77,75 @@ public void testChangeRecordIsNoOp() { ); } - private final static PartitionRegistration FOO = new PartitionRegistration( - new int[] {2, 1, 3}, new int[] {2, 1, 3}, Replicas.NONE, Replicas.NONE, - 1, LeaderRecoveryState.RECOVERED, 100, 200); + private static final PartitionRegistration FOO; + + static { + try { + FOO = new PartitionRegistration.Builder(). + setReplicas(new int[] {2, 1, 3}). + setIsr(new int[] {2, 1, 3}). + setRemovingReplicas(Replicas.NONE). + setAddingReplicas(Replicas.NONE). + setLeader(1). + setLeaderRecoveryState(LeaderRecoveryState.RECOVERED). + setLeaderEpoch(100). + setPartitionEpoch(200). + build(); + } catch (Exception e) { + throw new RuntimeException(e); + } Review Comment: Yeah. I've changed the signature to not have `throws Exception` so I've removed the catches. -- 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