wperlichek opened a new pull request, #17724:
URL: https://github.com/apache/kafka/pull/17724

   This test appears to be flaky because we mutated and reused the mocked log 
segments. Instead of using `thenReturn()`  and changing return value of an 
existing mock, or mutating the log segments within an existing mock return 
value, we can establish states we will need for the test and then conditionally 
return them using `thenAnswer()` to ensure consistent/reliable mock behavior.
   
   I ran the whole test class 100 times locally using below command and saw 
100% success rate:
   
   `N=100; I=0; while [ $I -lt $N ]; do ./gradlew core:test --tests 
"kafka.log.remote.RemoteLogManagerTest" --rerun --fail-fast; (( I=$I+1 )); echo 
"Completed run: $I"; sleep 1; done`
   
   Resources for others interested in learning about tiered storage:
   Deep dive: 
https://developers.redhat.com/articles/2024/03/13/kafka-tiered-storage-deep-dive
   KIP: 
https://cwiki.apache.org/confluence/display/KAFKA/KIP-405%3A+Kafka+Tiered+Storage
   
   @kamalcph @chia7712 FYI
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


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