GJL commented on a change in pull request #6785: [FLINK-10309][rest] Before
shutting down cluster, wait for asynchronous operations
URL: https://github.com/apache/flink/pull/6785#discussion_r225912353
##########
File path:
flink-runtime/src/test/java/org/apache/flink/runtime/rest/RestServerEndpointITCase.java
##########
@@ -661,12 +657,10 @@ protected void startInternal() {}
// Intentionally schedule the work on a
different thread. This is to simulate
// handlers where the CompletableFuture is
finished by the RPC framework.
return CompletableFuture.supplyAsync(() -> {
- synchronized (LOCK) {
- try {
- LOCK.notifyAll();
- LOCK.wait();
Review comment:
Replaced with `CountDownLatch` because there can be spurious wakeups:
- https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--
-
https://stackoverflow.com/questions/1050592/do-spurious-wakeups-in-java-actually-happen
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services