Parkerhiphop commented on code in PR #21244:
URL: https://github.com/apache/kafka/pull/21244#discussion_r2664163525


##########
core/src/test/scala/unit/kafka/server/ReplicaManagerTest.scala:
##########
@@ -5514,6 +5514,16 @@ class ReplicaManagerTest {
 
     try {
       val spiedPartition = spy(Partition(tpId, time, replicaManager))
+
+      val blockPromotion = new AtomicBoolean(false)

Review Comment:
   @gaurav-narula Thanks! That's a great refinement! It makes the code much 
cleaner.
   
   I have updated the code to `new AtomicBoolean(true)` and removed the 
explicit `set(true)` call.
   
   The logic remains the same (blocking the first attempt via CAS), and I 
verified it with the loop test again (same result as before)



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