leaf-soba commented on code in PR #18926:
URL: https://github.com/apache/kafka/pull/18926#discussion_r1998286042


##########
raft/src/test/java/org/apache/kafka/raft/KafkaRaftClientTest.java:
##########
@@ -920,10 +917,10 @@ public void 
testInitializeAsUnattachedAndBecomeLeader(boolean withKip853Rpc) thr
         RecordBatch batch = records.batches().iterator().next();
         assertTrue(batch.isControlBatch());
 
-        Record record = batch.iterator().next();
-        assertEquals(electionTimestamp, record.timestamp());
+        Record expectedRecord = batch.iterator().next();

Review Comment:
   @chia7712, I believe restricted identifiers should be avoided as variable 
names. While the code compiles, using such names can make it less readable and 
more confusing. For example:
   ```
   var var = "var";
   
   record Data(int id, String name) {} //record is used to define record classes
   ```
   Renaming it to `expectedRecord` improves clarity and makes the intent of the 
variable more explicit.



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