mingyen066 commented on PR #21078:
URL: https://github.com/apache/kafka/pull/21078#issuecomment-3805295066

   @squah-confluent, @chia7712
   
   I've updated these tests to use a real Node instance instead of 
Node.noNode().
   The issue is that `Node.noNode()` returns `Node(-1, "", -1)` rather than 
`null`. Since the leader validation in 
`OffsetsUtils.filterNoneLeaderPartitions()` checks for `leader() == null`, 
using `Node.noNode()` bypasses this check entirely.
   Given that these tests are validating successful operations that require a 
valid leader, a real Node instance is more appropriate. Using `null` would 
trigger a `LeaderNotAvailableException`, which isn't the intended behavior for 
these success-path tests.


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

Reply via email to