KarmaGYZ commented on a change in pull request #18853:
URL: https://github.com/apache/flink/pull/18853#discussion_r810750775
##########
File path:
flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/ResourceManagerServiceImplTest.java
##########
@@ -448,6 +449,39 @@ public void closeService_futureCompleteAfterRmTerminated()
throws Exception {
closeServiceFuture.get(TIMEOUT.getSize(), TIMEOUT.getUnit());
}
+ @Test
+ public void deregisterApplication_leaderRmNotStarted() throws Exception {
+ final CompletableFuture<Void> startRmInitializationFuture = new
CompletableFuture<>();
+ final CompletableFuture<Void> finishRmInitializationFuture = new
CompletableFuture<>();
+
+ rmFactoryBuilder.setInitializeConsumer(
+ (ignore) -> {
+ startRmInitializationFuture.complete(null);
+ blockOnFuture(finishRmInitializationFuture);
+ });
+
+ createAndStartResourceManager();
+
+ // grant leadership
+ leaderElectionService.isLeader(UUID.randomUUID());
+
+ // make sure leader RM is created
+ startRmInitializationFuture.get(TIMEOUT.getSize(), TIMEOUT.getUnit());
+
+ // deregister application
+ final CompletableFuture<Void> deregisterApplicationFuture =
+
resourceManagerService.deregisterApplication(ApplicationStatus.CANCELED, null);
+
+ // RM not fully started, future shuold not complete
Review comment:
shuold -> should
--
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]