FrankChen021 commented on code in PR #20071:
URL: https://github.com/apache/druid/pull/20071#discussion_r4219039194


##########
processing/src/test/java/org/apache/druid/segment/join/PostJoinCursorTest.java:
##########
@@ -237,7 +237,7 @@ private void testAdvance(boolean withInterruption) throws 
IOException, Interrupt
     joinCursorThread.setUncaughtExceptionHandler(exceptionHandler);
     joinCursorThread.start();
 
-    countDownLatch.await(1, TimeUnit.SECONDS);
+    assertTrue(countDownLatch.await(1, TimeUnit.SECONDS));

Review Comment:
   [P1] Always interrupt the infinite cursor thread after a timeout
   
   **Finding:** If the cursor thread does not reach 1,000 rows within the 
one-second deadline, assertTrue throws before joinCursorThread.interrupt() 
runs. This worker is a non-daemon Thread with an intentionally infinite cursor 
and an always-false matcher, so it continues spinning after the test fails and 
can prevent the test JVM from terminating. This is the same lifecycle issue 
identified in the previous review and it remains unchanged at the current head.
   
   **Suggestion:** Put interruption and a bounded join in a finally block so 
worker cleanup runs even when the await assertion fails.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to