Dennis-Mircea commented on code in PR #28106:
URL: https://github.com/apache/flink/pull/28106#discussion_r3194148692
##########
flink-connectors/flink-connector-base/src/test/java/org/apache/flink/connector/base/source/reader/fetcher/SplitFetcherManagerTest.java:
##########
@@ -129,13 +129,14 @@ public void testCloseBlockingWaitingForFetcherShutdown()
throws Exception {
closingThread.start();
waitUntil(
- () ->
findThread(SplitFetcherManager.THREAD_NAME_PREFIX).size() == 2,
+ () ->
findThread(SplitFetcherManager.THREAD_NAME_PREFIX).size() >= 2,
Duration.ofSeconds(30),
"The element queue draining thread should have started.");
for (Thread t : findThread(SplitFetcherManager.THREAD_NAME_PREFIX)) {
waitUntil(
() ->
- t.getState().equals(Thread.State.WAITING)
+ !t.isAlive()
+ ||
t.getState().equals(Thread.State.WAITING)
Review Comment:
assertion message updated to reflect the broader accepted states (terminated
or (timed) waiting), with a comment explaining why a terminated thread is
acceptable.
--
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]