Abacn commented on code in PR #30278:
URL: https://github.com/apache/beam/pull/30278#discussion_r1484502596


##########
sdks/java/core/src/test/java/org/apache/beam/sdk/fn/data/BeamFnDataInboundObserverTest.java:
##########
@@ -165,6 +165,7 @@ public void 
testCloseVisibleToAwaitCompletionCallerAndProducer() throws Exceptio
     Future<?> future2 =
         executor.submit(
             () -> {
+              Thread.sleep(500); // give the previous future some time to 
reach the inf while loop

Review Comment:
   Busy sleep is generally not preferable. Consider use wait/notify which 
sounds exactly what we need here? That is block this thread until future1 
reaches while(true)



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