dmvk commented on a change in pull request #18136:
URL: https://github.com/apache/flink/pull/18136#discussion_r773271956
##########
File path:
flink-clients/src/test/java/org/apache/flink/client/deployment/application/ApplicationDispatcherBootstrapITCase.java
##########
@@ -106,8 +112,16 @@ public void
testDispatcherRecoversAfterLosingAndRegainingLeadership() throws Exc
JobStatus.RUNNING,
deadline);
+ // make sure the operator is actually running
+ BlockingJob.awaitRunning(blockId);
+
+ final CompletableFuture<JobResult> firstJobResult =
+
cluster.requestJobResult(ApplicationDispatcherBootstrap.ZERO_JOB_ID);
// revoke & re-grant dispatcher leadership
haServices.revokeDispatcherLeadership();
+ // make sure the leadership is revoked to avoid race conditions
+ Assertions.assertEquals(
Review comment:
The important part here is calling the `get()` method on the job result
future, which blocks until the application "completes" / leadership is revoked.
The assert itself just checks that the returned status is as we expect it to
be.
--
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]