sudeshwasnik commented on PR #13646: URL: https://github.com/apache/kafka/pull/13646#issuecomment-1592302321
hi @sagarrao12 , small correction in my comment earlier - ``` Since assumption 1 is incorrect, we should change the test where it doesn't expect every record that decrements recordsToCommitLatch also must have been produced. ``` it seems that `recordsRemainingLatch` only tries to wait until X records have been returned by source-task to framework. Say MINIMUM_MESSAGES = 1000, but MESSAGES_PER_POLL is configured 100, so we need to wait until source-task delivers 1000 messages to framework. This helps in not including `production` time in `awaitCommits` assertion timeout (?).... wdyt ? Also, the reason this PR passes the test now is because, it doesn't validate X records are present in topic `when` X countDown for `awaitCommits` is done. It'll wait `until` X records are produced into the topic -> by then there could've been many more `commitRecord`s. This assertion doesn't help now because connector is running continously, so there `WILL` be MINIMUM_MESSAGES produced eventually. `` assertTrue("Not enough records produced by source connector. Expected at least: " + MINIMUM_MESSAGES + " + but got " + sourceRecords.count(), sourceRecords.count() >= MINIMUM_MESSAGES); `` -- 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