metaswirl commented on a change in pull request #18136:
URL: https://github.com/apache/flink/pull/18136#discussion_r771540977
##########
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
Review comment:
maybe we should remove this line, because the commands are not connected
anymore and the comment add nothing beyond the command itself.
##########
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:
How does adding an assert resolve a race condition?
--
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]