fapaul commented on PR #133:
URL: 
https://github.com/apache/flink-connector-kafka/pull/133#issuecomment-2698041282

   > I never liked it much, But I was not able to deterministically make it 
throw within a thread.
   Any help is welcome.
   
   I agree with that the current code structure makes it hard to test. My 
suggestion is to change your existing test slightly to use a similar pattern to 
the existing test: 
https://github.com/apache/flink-connector-kafka/blob/7c112abe8bf78e0cd8a310aaa65b57f6a70ad30a/flink-connector-kafka/src/test/java/org/apache/flink/connector/kafka/source/reader/KafkaPartitionSplitReaderTest.java#L110.
   
   The existing test retries calling `reader.wakeUp` as long as the thread 
runs, increasing the likelihood of hitting the case. Your test, on the other 
hand, only calls it once and then waits for the thread to finish.


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