showuon opened a new pull request #10228:
URL: https://github.com/apache/kafka/pull/10228


   We need to wait for the translation state changed to `READY` to start 
consuming the records. But we didn't have any way to change the 
transationManager state in client, so we can just wait. I've confirmed that if 
we try another time, we can pass the tests. My test code is like this:
   
   ```java
   var isFailed = false
       try {
         pollRecordsUntilTrue(consumer, pollAction,
           waitTimeMs = waitTimeMs,
           msg = s"Consumed ${records.size} records before timeout instead of 
the expected $numRecords records")
       } catch {
         case e: AssertionFailedError => {
           isFailed = true
           System.err.println(s"!!! Consumed ${records.size} records before 
timeout instead of the expected $numRecords records")
         }
       }
   
       if (isFailed) {
         pollRecordsUntilTrue(consumer, pollAction,
           waitTimeMs = 30000,
           msg = s"Consumed ${records.size} records before timeout instead of 
the expected $numRecords records")
   
         // if we go to this step, it means it passed in 2nd try
         fail("failed at 1st try")
       }
   ```
   
   And they failed with `failed at 1st try`, which confirmed that we can pass 
the tests by increasing the timeout. Thanks.
   
   ### 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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to